-
Notifications
You must be signed in to change notification settings - Fork 5
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
12 changed files
with
211 additions
and
59 deletions.
There are no files selected for viewing
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
52 changes: 52 additions & 0 deletions
52
src/generated/resources/assets/reignitedutilities/blockstates/cursed_earth.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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"variants": { | ||
"spread=0": { | ||
"model": "reignitedutilities:block/cursed_earth" | ||
}, | ||
"spread=1": { | ||
"model": "reignitedutilities:block/cursed_earth" | ||
}, | ||
"spread=2": { | ||
"model": "reignitedutilities:block/cursed_earth" | ||
}, | ||
"spread=3": { | ||
"model": "reignitedutilities:block/cursed_earth" | ||
}, | ||
"spread=4": { | ||
"model": "reignitedutilities:block/cursed_earth" | ||
}, | ||
"spread=5": { | ||
"model": "reignitedutilities:block/cursed_earth" | ||
}, | ||
"spread=6": { | ||
"model": "reignitedutilities:block/cursed_earth" | ||
}, | ||
"spread=7": { | ||
"model": "reignitedutilities:block/cursed_earth" | ||
}, | ||
"spread=8": { | ||
"model": "reignitedutilities:block/cursed_earth" | ||
}, | ||
"spread=9": { | ||
"model": "reignitedutilities:block/cursed_earth" | ||
}, | ||
"spread=10": { | ||
"model": "reignitedutilities:block/cursed_earth" | ||
}, | ||
"spread=11": { | ||
"model": "reignitedutilities:block/cursed_earth" | ||
}, | ||
"spread=12": { | ||
"model": "reignitedutilities:block/cursed_earth" | ||
}, | ||
"spread=13": { | ||
"model": "reignitedutilities:block/cursed_earth" | ||
}, | ||
"spread=14": { | ||
"model": "reignitedutilities:block/cursed_earth" | ||
}, | ||
"spread=15": { | ||
"model": "reignitedutilities:block/cursed_earth" | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/generated/resources/assets/reignitedutilities/blockstates/manual_mill.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"variants": { | ||
"facing=north": { | ||
"model": "reignitedutilities:block/manual_mill" | ||
}, | ||
"facing=south": { | ||
"model": "reignitedutilities:block/manual_mill", | ||
"y": 180 | ||
}, | ||
"facing=west": { | ||
"model": "reignitedutilities:block/manual_mill", | ||
"y": 270 | ||
}, | ||
"facing=east": { | ||
"model": "reignitedutilities:block/manual_mill", | ||
"y": 90 | ||
} | ||
} | ||
} |
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
19 changes: 19 additions & 0 deletions
19
src/generated/resources/assets/reignitedutilities/blockstates/wind_mill.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"variants": { | ||
"facing=north": { | ||
"model": "reignitedutilities:block/wind_mill" | ||
}, | ||
"facing=south": { | ||
"model": "reignitedutilities:block/wind_mill", | ||
"y": 180 | ||
}, | ||
"facing=west": { | ||
"model": "reignitedutilities:block/wind_mill", | ||
"y": 270 | ||
}, | ||
"facing=east": { | ||
"model": "reignitedutilities:block/wind_mill", | ||
"y": 90 | ||
} | ||
} | ||
} |
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
20 changes: 18 additions & 2 deletions
20
.../site/hellishmods/reignitedutilities/lib/loottables/ReignitedUtilitiesBlockLootTable.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
34 changes: 0 additions & 34 deletions
34
.../java/site/hellishmods/reignitedutilities/providers/blocks/AllSideBlockModelProvider.java
This file was deleted.
Oops, something went wrong.
58 changes: 58 additions & 0 deletions
58
...in/java/site/hellishmods/reignitedutilities/providers/blocks/OtherBlockStateProvider.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,58 @@ | ||
package site.hellishmods.reignitedutilities.providers.blocks; | ||
|
||
import java.util.ArrayList; | ||
|
||
import com.google.common.collect.Lists; | ||
|
||
import net.minecraft.data.DataGenerator; | ||
import net.minecraft.resources.ResourcePackType; | ||
import net.minecraft.util.ResourceLocation; | ||
import net.minecraftforge.client.model.generators.BlockStateProvider; | ||
import net.minecraftforge.client.model.generators.ConfiguredModel; | ||
import net.minecraftforge.client.model.generators.ModelFile; | ||
import net.minecraftforge.client.model.generators.ModelProvider; | ||
import net.minecraftforge.client.model.generators.ModelFile.ExistingModelFile; | ||
import net.minecraftforge.common.data.ExistingFileHelper; | ||
import net.minecraftforge.common.data.ExistingFileHelper.ResourceType; | ||
import net.minecraftforge.registries.ForgeRegistries; | ||
import site.hellishmods.reignitedutilities.reignitedutilities; | ||
import site.hellishmods.reignitedutilities.lib.blocks.OrientableBlock; | ||
|
||
public class OtherBlockStateProvider extends BlockStateProvider { | ||
private static final ArrayList<String> ALL_SIDED_MODELS = Lists.newArrayList( | ||
"polished_stone", | ||
"stoneburnt", | ||
"stoneburnt_chiseled", | ||
"stoneburnt_cross", | ||
"truchet", | ||
"angel_block", | ||
"overworld_portal" | ||
); | ||
|
||
ExistingFileHelper exFileHelper; | ||
public OtherBlockStateProvider(DataGenerator gen, ExistingFileHelper exFileHelper) { | ||
super(gen, reignitedutilities.MOD_ID, exFileHelper); | ||
this.exFileHelper = exFileHelper; | ||
} | ||
|
||
@Override | ||
protected void registerStatesAndModels() { | ||
ForgeRegistries.BLOCKS.getValues().stream().filter(b -> b.getRegistryName().getNamespace().equals(reignitedutilities.MOD_ID)).forEach(b -> { | ||
if (ALL_SIDED_MODELS.contains(b.getRegistryName().getPath())) { | ||
simpleBlock(b); | ||
return; | ||
} | ||
|
||
ExistingModelFile model = new ModelFile.ExistingModelFile(new ResourceLocation(b.getRegistryName().getNamespace(), ModelProvider.BLOCK_FOLDER+"/"+b.getRegistryName().getPath()), exFileHelper); | ||
if (!exFileHelper.exists(model.getUncheckedLocation(), new ResourceType(ResourcePackType.CLIENT_RESOURCES, ".json", "models"))) return; | ||
|
||
if (b instanceof OrientableBlock) { | ||
horizontalBlock(b, model); | ||
return; | ||
} | ||
|
||
getVariantBuilder(b).forAllStates(state -> ConfiguredModel.builder().modelFile(model).build()); | ||
}); | ||
} | ||
|
||
} |
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,4 +1,5 @@ | ||
protected net.minecraft.data.loot.BlockLootTables field_218573_a # HAS_SILK_TOUCH | ||
|
||
public net.minecraft.client.gui.NewChatGui func_146234_a(Lnet/minecraft/util/text/ITextComponent;I)V # addMessage | ||
public net.minecraft.client.gui.NewChatGui func_146242_c(I)V # removeById | ||
public net.minecraft.block.RedstoneOreBlock func_196500_d(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V # interact | ||
public net.minecraft.state.StateHolder field_235893_d_ # propertiesCodec | ||
public net.minecraft.block.RedstoneOreBlock func_196500_d(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V # interact |
7 changes: 0 additions & 7 deletions
7
src/main/resources/assets/reignitedutilities/blockstates/cursed_earth.json
This file was deleted.
Oops, something went wrong.