|
18 | 18 |
|
19 | 19 | public class MusicExpandedModelProvider extends FabricModelProvider { |
20 | 20 |
|
21 | | - public MusicExpandedModelProvider(FabricDataOutput output) { |
22 | | - super(output); |
23 | | - } |
| 21 | + public MusicExpandedModelProvider(FabricDataOutput output) { |
| 22 | + super(output); |
| 23 | + } |
24 | 24 |
|
25 | | - @Override |
26 | | - public void generateBlockStateModels(BlockModelGenerators blockStateModelGenerator) { |
27 | | - // Disc Burner |
28 | | - MultiVariant nodisc = BlockModelGenerators |
29 | | - .plainVariant(Identifier.fromNamespaceAndPath(MusicExpanded.MOD_ID, "block/disc_burner")); |
30 | | - MultiVariant hasdisc = BlockModelGenerators |
31 | | - .plainVariant(Identifier.fromNamespaceAndPath(MusicExpanded.MOD_ID, "block/disc_burner_loaded")); |
32 | | - blockStateModelGenerator.blockStateOutput |
33 | | - .accept(MultiVariantGenerator.dispatch(MusicExpandedBlocks.DISC_BURNER_BLOCK) |
34 | | - .with(PropertyDispatch.initial(DiscBurnerBlock.FACING, DiscBurnerBlock.LOADED) |
35 | | - .select(Direction.NORTH, false, nodisc) |
36 | | - .select(Direction.EAST, false, nodisc.with(BlockModelGenerators.Y_ROT_90)) |
37 | | - .select(Direction.SOUTH, false, nodisc.with(BlockModelGenerators.Y_ROT_180)) |
38 | | - .select(Direction.WEST, false, nodisc.with(BlockModelGenerators.Y_ROT_270)) |
39 | | - .select(Direction.NORTH, true, hasdisc) |
40 | | - .select(Direction.EAST, true, hasdisc.with(BlockModelGenerators.Y_ROT_90)) |
41 | | - .select(Direction.SOUTH, true, hasdisc.with(BlockModelGenerators.Y_ROT_180)) |
42 | | - .select(Direction.WEST, true, hasdisc.with(BlockModelGenerators.Y_ROT_270)))); |
43 | | - blockStateModelGenerator.registerSimpleItemModel(MusicExpandedBlocks.DISC_BURNER_BLOCK, |
44 | | - Identifier.fromNamespaceAndPath(MusicExpanded.MOD_ID, "block/disc_burner")); |
45 | | - // Stereo |
46 | | - MultiVariant snodisc = BlockModelGenerators |
47 | | - .plainVariant(Identifier.fromNamespaceAndPath(MusicExpanded.MOD_ID, "block/stereo")); |
48 | | - MultiVariant shasdisc = BlockModelGenerators |
49 | | - .plainVariant(Identifier.fromNamespaceAndPath(MusicExpanded.MOD_ID, "block/stereo_loaded")); |
50 | | - blockStateModelGenerator.blockStateOutput |
51 | | - .accept(MultiVariantGenerator.dispatch(MusicExpandedBlocks.STEREO_BLOCK) |
52 | | - .with(PropertyDispatch.initial(StereoBlock.FACING, StereoBlock.LOADED) |
53 | | - .select(Direction.NORTH, false, snodisc) |
54 | | - .select(Direction.EAST, false, snodisc.with(BlockModelGenerators.Y_ROT_90)) |
55 | | - .select(Direction.SOUTH, false, snodisc.with(BlockModelGenerators.Y_ROT_180)) |
56 | | - .select(Direction.WEST, false, snodisc.with(BlockModelGenerators.Y_ROT_270)) |
57 | | - .select(Direction.NORTH, true, shasdisc) |
58 | | - .select(Direction.EAST, true, shasdisc.with(BlockModelGenerators.Y_ROT_90)) |
59 | | - .select(Direction.SOUTH, true, shasdisc.with(BlockModelGenerators.Y_ROT_180)) |
60 | | - .select(Direction.WEST, true, shasdisc.with(BlockModelGenerators.Y_ROT_270)))); |
61 | | - blockStateModelGenerator.registerSimpleItemModel(MusicExpandedBlocks.STEREO_BLOCK, |
62 | | - Identifier.fromNamespaceAndPath(MusicExpanded.MOD_ID, "block/stereo")); |
| 25 | + @Override |
| 26 | + public void generateBlockStateModels(BlockModelGenerators blockStateModelGenerator) { |
| 27 | + // Disc Burner |
| 28 | + MultiVariant nodisc = BlockModelGenerators |
| 29 | + .plainVariant(Identifier.fromNamespaceAndPath(MusicExpanded.MOD_ID, |
| 30 | + "block/disc_burner")); |
| 31 | + MultiVariant hasdisc = BlockModelGenerators |
| 32 | + .plainVariant(Identifier.fromNamespaceAndPath(MusicExpanded.MOD_ID, |
| 33 | + "block/disc_burner_loaded")); |
| 34 | + MultiVariant spinningdisc = BlockModelGenerators |
| 35 | + .plainVariant(Identifier.fromNamespaceAndPath(MusicExpanded.MOD_ID, |
| 36 | + "block/disc_burner_burning")); |
| 37 | + blockStateModelGenerator.blockStateOutput |
| 38 | + .accept(MultiVariantGenerator.dispatch(MusicExpandedBlocks.DISC_BURNER_BLOCK) |
| 39 | + .with(PropertyDispatch |
| 40 | + .initial(DiscBurnerBlock.FACING, DiscBurnerBlock.LOADED, DiscBurnerBlock.BURNING) |
| 41 | + /// not burning |
| 42 | + .select(Direction.NORTH, false, false, nodisc) |
| 43 | + .select(Direction.EAST, false, false, nodisc |
| 44 | + .with(BlockModelGenerators.Y_ROT_90)) |
| 45 | + .select(Direction.SOUTH, false, false, nodisc |
| 46 | + .with(BlockModelGenerators.Y_ROT_180)) |
| 47 | + .select(Direction.WEST, false, false, nodisc |
| 48 | + .with(BlockModelGenerators.Y_ROT_270)) |
| 49 | + // loaded |
| 50 | + .select(Direction.NORTH, true, false, hasdisc) |
| 51 | + .select(Direction.EAST, true, false, hasdisc |
| 52 | + .with(BlockModelGenerators.Y_ROT_90)) |
| 53 | + .select(Direction.SOUTH, true, false, hasdisc |
| 54 | + .with(BlockModelGenerators.Y_ROT_180)) |
| 55 | + .select(Direction.WEST, true, false, hasdisc.with( |
| 56 | + BlockModelGenerators.Y_ROT_270)) |
| 57 | + /// burning |
| 58 | + .select(Direction.NORTH, false, true, spinningdisc) |
| 59 | + .select(Direction.EAST, false, true, spinningdisc |
| 60 | + .with(BlockModelGenerators.Y_ROT_90)) |
| 61 | + .select(Direction.SOUTH, false, true, spinningdisc |
| 62 | + .with(BlockModelGenerators.Y_ROT_180)) |
| 63 | + .select(Direction.WEST, false, true, spinningdisc |
| 64 | + .with(BlockModelGenerators.Y_ROT_270)) |
| 65 | + // loaded |
| 66 | + .select(Direction.NORTH, true, true, spinningdisc) |
| 67 | + .select(Direction.EAST, true, true, spinningdisc |
| 68 | + .with(BlockModelGenerators.Y_ROT_90)) |
| 69 | + .select(Direction.SOUTH, true, true, spinningdisc |
| 70 | + .with(BlockModelGenerators.Y_ROT_180)) |
| 71 | + .select(Direction.WEST, true, true, spinningdisc.with( |
| 72 | + BlockModelGenerators.Y_ROT_270)))); |
| 73 | + blockStateModelGenerator.registerSimpleItemModel(MusicExpandedBlocks.DISC_BURNER_BLOCK, |
| 74 | + Identifier.fromNamespaceAndPath(MusicExpanded.MOD_ID, "block/disc_burner")); |
| 75 | + // Stereo |
| 76 | + MultiVariant snodisc = BlockModelGenerators |
| 77 | + .plainVariant(Identifier.fromNamespaceAndPath(MusicExpanded.MOD_ID, "block/stereo")); |
| 78 | + MultiVariant shasdisc = BlockModelGenerators |
| 79 | + .plainVariant(Identifier.fromNamespaceAndPath(MusicExpanded.MOD_ID, |
| 80 | + "block/stereo_loaded")); |
| 81 | + blockStateModelGenerator.blockStateOutput |
| 82 | + .accept(MultiVariantGenerator.dispatch(MusicExpandedBlocks.STEREO_BLOCK) |
| 83 | + .with(PropertyDispatch.initial(StereoBlock.FACING, StereoBlock.LOADED) |
| 84 | + .select(Direction.NORTH, false, snodisc) |
| 85 | + .select(Direction.EAST, false, snodisc |
| 86 | + .with(BlockModelGenerators.Y_ROT_90)) |
| 87 | + .select(Direction.SOUTH, false, snodisc |
| 88 | + .with(BlockModelGenerators.Y_ROT_180)) |
| 89 | + .select(Direction.WEST, false, snodisc |
| 90 | + .with(BlockModelGenerators.Y_ROT_270)) |
| 91 | + .select(Direction.NORTH, true, shasdisc) |
| 92 | + .select(Direction.EAST, true, shasdisc |
| 93 | + .with(BlockModelGenerators.Y_ROT_90)) |
| 94 | + .select(Direction.SOUTH, true, shasdisc |
| 95 | + .with(BlockModelGenerators.Y_ROT_180)) |
| 96 | + .select(Direction.WEST, true, shasdisc.with( |
| 97 | + BlockModelGenerators.Y_ROT_270)))); |
| 98 | + blockStateModelGenerator.registerSimpleItemModel(MusicExpandedBlocks.STEREO_BLOCK, |
| 99 | + Identifier.fromNamespaceAndPath(MusicExpanded.MOD_ID, "block/stereo")); |
63 | 100 |
|
64 | | - } |
| 101 | + } |
65 | 102 |
|
66 | | - @Override |
67 | | - public void generateItemModels(ItemModelGenerators itemModelGenerator) { |
68 | | - itemModelGenerator.generateFlatItem(MusicExpandedItems.GLASS_DUST, ModelTemplates.FLAT_ITEM); |
69 | | - itemModelGenerator.generateFlatItem(MusicExpandedItems.CD, ModelTemplates.FLAT_ITEM); |
70 | | - } |
| 103 | + @Override |
| 104 | + public void generateItemModels(ItemModelGenerators itemModelGenerator) { |
| 105 | + itemModelGenerator.generateFlatItem(MusicExpandedItems.GLASS_DUST, ModelTemplates.FLAT_ITEM); |
| 106 | + itemModelGenerator.generateFlatItem(MusicExpandedItems.CD, ModelTemplates.FLAT_ITEM); |
| 107 | + } |
71 | 108 |
|
72 | 109 | } |
0 commit comments