-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
6c4caf8
commit 8b9b1c9
Showing
12 changed files
with
91 additions
and
66 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
2 changes: 1 addition & 1 deletion
2
...StatesProvider/GCBlockStatesProvider.java → ...common/datagen/GCBlockStatesProvider.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
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
40 changes: 40 additions & 0 deletions
40
src/main/java/com/github/herat/GemCraft/common/datagen/GCItemModelProvider.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,40 @@ | ||
package com.github.herat.GemCraft.common.datagen; | ||
|
||
import net.minecraft.core.registries.BuiltInRegistries; | ||
import net.minecraft.data.PackOutput; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.item.Item; | ||
import net.neoforged.neoforge.client.model.generators.ItemModelProvider; | ||
import net.neoforged.neoforge.common.data.ExistingFileHelper; | ||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* @author herat | ||
*/ | ||
public class GCItemModelProvider extends ItemModelProvider { | ||
public GCItemModelProvider(PackOutput output, String modid , ExistingFileHelper existingFileHelper) { | ||
super(output,modid,existingFileHelper); | ||
} | ||
|
||
@Override | ||
protected void registerModels() { | ||
this.withExistingParent("ruby",mcLoc("item/generated")).texture("layer0","gemcraft:item/ruby"); | ||
this.withExistingParent("ruby_sword",mcLoc("item/handheld")).texture("layer0","gemcraft:item/ruby_sword"); | ||
// this.withExistingParent("ruby_sword",mcLoc("item/generated")).texture("layer0","gemcraft:item/ruby_sword"); | ||
// this.withExistingParent("ruby_pickaxe",mcLoc("item/generated")).texture("layer0","gemcraft:item/ruby_pickaxe"); | ||
// this.withExistingParent("ruby_shovel",mcLoc("item/generated")).texture("layer0","gemcraft:item/ruby_shovel"); | ||
// this.withExistingParent("ruby_axe",mcLoc("item/generated")).texture("layer0","gemcraft:item/ruby_axe"); | ||
// this.withExistingParent("ruby_hoe",mcLoc("item/generated")).texture("layer0","gemcraft:item/ruby_hoe"); | ||
// this.withExistingParent("sapphire",mcLoc("item/generated")).texture("layer0","gemcraft:item/sapphire"); | ||
// this.withExistingParent("sapphire_sword",mcLoc("item/generated")).texture("layer0","gemcraft:item/sapphire_sword"); | ||
// this.withExistingParent("sapphire_pickaxe",mcLoc("item/generated")).texture("layer0","gemcraft:item/sapphire_pickaxe"); | ||
// this.withExistingParent("ruby_shovel",mcLoc("item/generated")).texture("layer0","gemcraft:item/ruby_shovel"); | ||
// this.withExistingParent("sapphire_axe",mcLoc("item/generated")).texture("layer0","gemcraft:item/sapphire_axe"); | ||
// this.withExistingParent("sapphire_hoe",mcLoc("item/generated")).texture("layer0","gemcraft:item/sapphire_hoe"); | ||
} | ||
|
||
public ResourceLocation getResourceLocation(Item item) { | ||
return Objects.requireNonNull(BuiltInRegistries.ITEM.getKey(item)); | ||
} | ||
} |
40 changes: 0 additions & 40 deletions
40
...in/java/com/github/herat/GemCraft/common/datagen/GCModelProvider/GCItemModelProvider.java
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
src/main/java/com/github/herat/GemCraft/common/datagen/GCRecipeProvider.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,34 @@ | ||
package com.github.herat.GemCraft.common.datagen; | ||
|
||
import com.github.herat.GemCraft.common.register.GemCraftItem; | ||
import net.minecraft.core.HolderLookup; | ||
import net.minecraft.data.PackOutput; | ||
import net.minecraft.data.recipes.RecipeCategory; | ||
import net.minecraft.data.recipes.RecipeOutput; | ||
import net.minecraft.data.recipes.RecipeProvider; | ||
import net.minecraft.data.recipes.ShapedRecipeBuilder; | ||
import net.minecraft.world.item.Items; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
|
||
/** | ||
* @author herat | ||
*/ | ||
public class GCRecipeProvider extends RecipeProvider { | ||
public GCRecipeProvider(PackOutput pPackOutput, CompletableFuture<HolderLookup.Provider> lookupProvider) { | ||
super(pPackOutput, lookupProvider); | ||
} | ||
|
||
@Override | ||
protected void buildRecipes(@NotNull RecipeOutput pRecipeOutput) { | ||
ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, GemCraftItem.RUBY_SWORD.get()) | ||
.pattern(" a ") | ||
.pattern(" a ") | ||
.pattern(" b ") | ||
.define('a', GemCraftItem.RUBY.get()) | ||
.define('b', Items.STICK) | ||
.save(pRecipeOutput); | ||
// ShapedRecipeBuilder.shaped(RecipeCategory.MISC, GemCraftItem.RUBY_SWORD.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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.