generated from neoforged/MDK
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
86 additions
and
506 deletions.
There are no files selected for viewing
7 changes: 0 additions & 7 deletions
7
src/generated/resources/assets/examplemod/blockstates/example_fluid.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
src/generated/resources/assets/examplemod/models/block/example_fluid.json
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/generated/resources/assets/examplemod/models/item/example_block.json
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
src/generated/resources/data/examplemod/loot_table/blocks/example_block_demo.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"values": [ | ||
"examplemod:example_block", | ||
"examplemod:example_block_demo" | ||
"examplemod:example_block" | ||
] | ||
} |
3 changes: 1 addition & 2 deletions
3
src/generated/resources/data/minecraft/tags/block/mushroom_grow_block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"values": [ | ||
"examplemod:example_block", | ||
"examplemod:example_block_demo" | ||
"examplemod:example_block" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"values": [ | ||
"examplemod:example_block", | ||
"examplemod:example_block_demo" | ||
"examplemod:example_block" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/com/enderio/regilite/blocks/RegiliteBlockStateProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright (c) Team Ender IO and contributors | ||
* SPDX-License-Identifier: LGPL-3.0-only | ||
*/ | ||
|
||
package com.enderio.regilite.blocks; | ||
|
||
import com.enderio.regilite.data.DataGenContext; | ||
import net.minecraft.data.PackOutput; | ||
import net.minecraft.world.level.block.Block; | ||
import net.neoforged.neoforge.client.model.generators.BlockStateProvider; | ||
import net.neoforged.neoforge.common.data.ExistingFileHelper; | ||
|
||
public class RegiliteBlockStateProvider extends BlockStateProvider { | ||
private final RegiliteBlocks blocks; | ||
|
||
public RegiliteBlockStateProvider(PackOutput output, String modid, ExistingFileHelper exFileHelper, RegiliteBlocks blocks) { | ||
super(output, modid, exFileHelper); | ||
this.blocks = blocks; | ||
} | ||
|
||
@Override | ||
protected void registerStatesAndModels() { | ||
blocks.blockBuilders().forEach(this::registerState); | ||
} | ||
|
||
private <T extends Block> void registerState(BlockBuilder<T> blockBuilder) { | ||
var blockStateProvider = blockBuilder.blockStateProvider(); | ||
if (blockStateProvider != null) { | ||
blockStateProvider.accept(this, new DataGenContext<>(blockBuilder.getId(), blockBuilder::get)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.