-
-
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
20 changed files
with
571 additions
and
572 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
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
90 changes: 45 additions & 45 deletions
90
src/main/java/com/aetherteam/treasure_reforging/data/ReforgingData.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 |
---|---|---|
@@ -1,47 +1,47 @@ | ||
package com.aetherteam.treasure_reforging.data; | ||
|
||
import com.aetherteam.treasure_reforging.data.generators.ReforgingBlockStateData; | ||
import com.aetherteam.treasure_reforging.data.generators.ReforgingItemModelData; | ||
import com.aetherteam.treasure_reforging.data.generators.ReforgingLanguageData; | ||
import com.aetherteam.treasure_reforging.data.generators.ReforgingRecipeData; | ||
import com.aetherteam.treasure_reforging.data.generators.tags.ReforgingBlockTagData; | ||
import com.aetherteam.treasure_reforging.data.generators.tags.ReforgingItemTagData; | ||
import net.minecraft.SharedConstants; | ||
import net.minecraft.core.HolderLookup; | ||
import net.minecraft.data.DataGenerator; | ||
import net.minecraft.data.PackOutput; | ||
import net.minecraft.data.metadata.PackMetadataGenerator; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.server.packs.PackType; | ||
import net.minecraft.server.packs.metadata.pack.PackMetadataSection; | ||
import net.minecraftforge.common.data.ExistingFileHelper; | ||
import net.minecraftforge.data.event.GatherDataEvent; | ||
|
||
import java.util.Map; | ||
import java.util.concurrent.CompletableFuture; | ||
|
||
public class ReforgingData { | ||
public static void dataSetup(GatherDataEvent event) { | ||
DataGenerator generator = event.getGenerator(); | ||
ExistingFileHelper fileHelper = event.getExistingFileHelper(); | ||
CompletableFuture<HolderLookup.Provider> lookupProvider = event.getLookupProvider(); | ||
PackOutput packOutput = generator.getPackOutput(); | ||
|
||
// Client Data | ||
generator.addProvider(event.includeClient(), new ReforgingBlockStateData(packOutput, fileHelper)); | ||
generator.addProvider(event.includeClient(), new ReforgingItemModelData(packOutput, fileHelper)); | ||
generator.addProvider(event.includeClient(), new ReforgingLanguageData(packOutput)); | ||
|
||
// Server Data | ||
generator.addProvider(event.includeServer(), new ReforgingRecipeData(packOutput)); | ||
ReforgingBlockTagData blockTags = new ReforgingBlockTagData(packOutput, lookupProvider, fileHelper); | ||
generator.addProvider(event.includeServer(), blockTags); | ||
generator.addProvider(event.includeServer(), new ReforgingItemTagData(packOutput, lookupProvider, blockTags.contentsGetter(), fileHelper)); | ||
|
||
// pack.mcmeta | ||
PackMetadataGenerator packMeta = new PackMetadataGenerator(packOutput); | ||
Map<PackType, Integer> packTypes = Map.of(PackType.SERVER_DATA, SharedConstants.getCurrentVersion().getPackVersion(PackType.SERVER_DATA)); | ||
packMeta.add(PackMetadataSection.TYPE, new PackMetadataSection(Component.translatable("pack.aether_treasure_reforging.mod.description"), SharedConstants.getCurrentVersion().getPackVersion(PackType.CLIENT_RESOURCES), packTypes)); | ||
generator.addProvider(true, packMeta); | ||
} | ||
} | ||
//import com.aetherteam.treasure_reforging.data.generators.ReforgingBlockStateData; | ||
//import com.aetherteam.treasure_reforging.data.generators.ReforgingItemModelData; | ||
//import com.aetherteam.treasure_reforging.data.generators.ReforgingLanguageData; | ||
//import com.aetherteam.treasure_reforging.data.generators.ReforgingRecipeData; | ||
//import com.aetherteam.treasure_reforging.data.generators.tags.ReforgingBlockTagData; | ||
//import com.aetherteam.treasure_reforging.data.generators.tags.ReforgingItemTagData; | ||
//import net.minecraft.SharedConstants; | ||
//import net.minecraft.core.HolderLookup; | ||
//import net.minecraft.data.DataGenerator; | ||
//import net.minecraft.data.PackOutput; | ||
//import net.minecraft.data.metadata.PackMetadataGenerator; | ||
//import net.minecraft.network.chat.Component; | ||
//import net.minecraft.server.packs.PackType; | ||
//import net.minecraft.server.packs.metadata.pack.PackMetadataSection; | ||
//import net.minecraftforge.common.data.ExistingFileHelper; | ||
//import net.minecraftforge.data.event.GatherDataEvent; | ||
// | ||
//import java.util.Map; | ||
//import java.util.concurrent.CompletableFuture; | ||
// | ||
//public class ReforgingData { | ||
// public static void dataSetup(GatherDataEvent event) { | ||
// DataGenerator generator = event.getGenerator(); | ||
// ExistingFileHelper fileHelper = event.getExistingFileHelper(); | ||
// CompletableFuture<HolderLookup.Provider> lookupProvider = event.getLookupProvider(); | ||
// PackOutput packOutput = generator.getPackOutput(); | ||
// | ||
// // Client Data | ||
// generator.addProvider(event.includeClient(), new ReforgingBlockStateData(packOutput, fileHelper)); | ||
// generator.addProvider(event.includeClient(), new ReforgingItemModelData(packOutput, fileHelper)); | ||
// generator.addProvider(event.includeClient(), new ReforgingLanguageData(packOutput)); | ||
// | ||
// // Server Data | ||
// generator.addProvider(event.includeServer(), new ReforgingRecipeData(packOutput)); | ||
// ReforgingBlockTagData blockTags = new ReforgingBlockTagData(packOutput, lookupProvider, fileHelper); | ||
// generator.addProvider(event.includeServer(), blockTags); | ||
// generator.addProvider(event.includeServer(), new ReforgingItemTagData(packOutput, lookupProvider, blockTags.contentsGetter(), fileHelper)); | ||
// | ||
// // pack.mcmeta | ||
// PackMetadataGenerator packMeta = new PackMetadataGenerator(packOutput); | ||
// Map<PackType, Integer> packTypes = Map.of(PackType.SERVER_DATA, SharedConstants.getCurrentVersion().getPackVersion(PackType.SERVER_DATA)); | ||
// packMeta.add(PackMetadataSection.TYPE, new PackMetadataSection(Component.translatable("pack.aether_treasure_reforging.mod.description"), SharedConstants.getCurrentVersion().getPackVersion(PackType.CLIENT_RESOURCES), packTypes)); | ||
// generator.addProvider(true, packMeta); | ||
// } | ||
//} |
34 changes: 17 additions & 17 deletions
34
src/main/java/com/aetherteam/treasure_reforging/data/generators/ReforgingBlockStateData.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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
package com.aetherteam.treasure_reforging.data.generators; | ||
|
||
import com.aetherteam.treasure_reforging.TreasureReforging; | ||
import com.aetherteam.treasure_reforging.block.ReforgingBlocks; | ||
import com.aetherteam.treasure_reforging.data.providers.ReforgingBlockStateProvider; | ||
import net.minecraft.data.PackOutput; | ||
import net.minecraftforge.common.data.ExistingFileHelper; | ||
|
||
public class ReforgingBlockStateData extends ReforgingBlockStateProvider { | ||
public ReforgingBlockStateData(PackOutput output, ExistingFileHelper helper) { | ||
super(output, TreasureReforging.MODID, helper); | ||
} | ||
|
||
@Override | ||
public void registerStatesAndModels() { | ||
this.pillarTop(ReforgingBlocks.VALKYRUM_BLOCK.get()); | ||
this.block(ReforgingBlocks.PYRAL_BLOCK.get(), "construction/"); | ||
} | ||
} | ||
//import com.aetherteam.treasure_reforging.TreasureReforging; | ||
//import com.aetherteam.treasure_reforging.block.ReforgingBlocks; | ||
//import com.aetherteam.treasure_reforging.data.providers.ReforgingBlockStateProvider; | ||
//import net.minecraft.data.PackOutput; | ||
//import net.minecraftforge.common.data.ExistingFileHelper; | ||
// | ||
//public class ReforgingBlockStateData extends ReforgingBlockStateProvider { | ||
// public ReforgingBlockStateData(PackOutput output, ExistingFileHelper helper) { | ||
// super(output, TreasureReforging.MODID, helper); | ||
// } | ||
// | ||
// @Override | ||
// public void registerStatesAndModels() { | ||
// this.pillarTop(ReforgingBlocks.VALKYRUM_BLOCK.get()); | ||
// this.block(ReforgingBlocks.PYRAL_BLOCK.get(), "construction/"); | ||
// } | ||
//} |
46 changes: 23 additions & 23 deletions
46
src/main/java/com/aetherteam/treasure_reforging/data/generators/ReforgingItemModelData.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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
package com.aetherteam.treasure_reforging.data.generators; | ||
|
||
import com.aetherteam.nitrogen.data.providers.NitrogenItemModelProvider; | ||
import com.aetherteam.treasure_reforging.TreasureReforging; | ||
import com.aetherteam.treasure_reforging.block.ReforgingBlocks; | ||
import com.aetherteam.treasure_reforging.item.ReforgingItems; | ||
import net.minecraft.data.PackOutput; | ||
import net.minecraftforge.common.data.ExistingFileHelper; | ||
|
||
public class ReforgingItemModelData extends NitrogenItemModelProvider { | ||
public ReforgingItemModelData(PackOutput output, ExistingFileHelper helper) { | ||
super(output, TreasureReforging.MODID, helper); | ||
} | ||
|
||
@Override | ||
protected void registerModels() { | ||
this.item(ReforgingItems.NEPTUNE_MESH.get(), "materials/"); | ||
this.item(ReforgingItems.VALKYRUM_INGOT.get(), "materials/"); | ||
this.item(ReforgingItems.PYRAL_SHARD.get(), "materials/"); | ||
this.item(ReforgingItems.PYRAL_INGOT.get(), "materials/"); | ||
|
||
this.itemBlock(ReforgingBlocks.VALKYRUM_BLOCK.get()); | ||
this.itemBlock(ReforgingBlocks.PYRAL_BLOCK.get()); | ||
} | ||
} | ||
//import com.aetherteam.nitrogen.data.providers.NitrogenItemModelProvider; | ||
//import com.aetherteam.treasure_reforging.TreasureReforging; | ||
//import com.aetherteam.treasure_reforging.block.ReforgingBlocks; | ||
//import com.aetherteam.treasure_reforging.item.ReforgingItems; | ||
//import net.minecraft.data.PackOutput; | ||
//import net.minecraftforge.common.data.ExistingFileHelper; | ||
// | ||
//public class ReforgingItemModelData extends NitrogenItemModelProvider { | ||
// public ReforgingItemModelData(PackOutput output, ExistingFileHelper helper) { | ||
// super(output, TreasureReforging.MODID, helper); | ||
// } | ||
// | ||
// @Override | ||
// protected void registerModels() { | ||
// this.item(ReforgingItems.NEPTUNE_MESH.get(), "materials/"); | ||
// this.item(ReforgingItems.VALKYRUM_INGOT.get(), "materials/"); | ||
// this.item(ReforgingItems.PYRAL_SHARD.get(), "materials/"); | ||
// this.item(ReforgingItems.PYRAL_INGOT.get(), "materials/"); | ||
// | ||
// this.itemBlock(ReforgingBlocks.VALKYRUM_BLOCK.get()); | ||
// this.itemBlock(ReforgingBlocks.PYRAL_BLOCK.get()); | ||
// } | ||
//} |
60 changes: 30 additions & 30 deletions
60
src/main/java/com/aetherteam/treasure_reforging/data/generators/ReforgingLanguageData.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 |
---|---|---|
@@ -1,32 +1,32 @@ | ||
package com.aetherteam.treasure_reforging.data.generators; | ||
|
||
import com.aetherteam.treasure_reforging.block.ReforgingBlocks; | ||
import com.aetherteam.treasure_reforging.data.providers.ReforgingLanguageProvider; | ||
import com.aetherteam.treasure_reforging.item.ReforgingItems; | ||
import net.minecraft.data.PackOutput; | ||
|
||
public class ReforgingLanguageData extends ReforgingLanguageProvider { | ||
public ReforgingLanguageData(PackOutput output) { | ||
super(output); | ||
} | ||
|
||
@Override | ||
protected void addTranslations() { | ||
this.addBlock(ReforgingBlocks.VALKYRUM_BLOCK, "Block of Valkyrum"); | ||
this.addBlock(ReforgingBlocks.PYRAL_BLOCK, "Block of Pyral"); | ||
|
||
this.addItem(ReforgingItems.NEPTUNE_MESH, "Neptune Mesh"); | ||
this.addItem(ReforgingItems.VALKYRUM_INGOT, "Valkyrum Ingot"); | ||
this.addItem(ReforgingItems.PYRAL_SHARD, "Pyral Shard"); | ||
this.addItem(ReforgingItems.PYRAL_INGOT, "Pyral Ingot"); | ||
|
||
this.addLore(ReforgingItems.NEPTUNE_MESH, "A mesh of interwoven blue metallic links. With the respective template, it can be used in a Smithing Table to forge Neptune armor."); | ||
this.addLore(ReforgingItems.VALKYRUM_INGOT, "A rare metal utilized by the Valkyries. With the respective template, it can be used in a Smithing Table to forge Valkyrie equipment."); | ||
this.addLore(ReforgingItems.PYRAL_SHARD, "When combined with obsidian, fragments of Pyral material can be used to craft Pyral Ingots. The shard can also function as a long-lasting fuel."); | ||
this.addLore(ReforgingItems.PYRAL_INGOT, "A hardened and fire-resistant ingot. With the respective template, it can be used in a Smithing Table to forge Phoenix armor."); | ||
this.addLore(ReforgingBlocks.VALKYRUM_BLOCK, "A solid block made from Valkyrum Ingots. They can power beacons and be used as decorative accenting."); | ||
this.addLore(ReforgingBlocks.PYRAL_BLOCK, "A solid block made from Pyral Ingots. They can power beacons and have a fiery look to them."); | ||
|
||
this.addPackDescription("mod", "The Aether: Treasure Reforging Resources"); | ||
} | ||
} | ||
//import com.aetherteam.treasure_reforging.block.ReforgingBlocks; | ||
//import com.aetherteam.treasure_reforging.data.providers.ReforgingLanguageProvider; | ||
//import com.aetherteam.treasure_reforging.item.ReforgingItems; | ||
//import net.minecraft.data.PackOutput; | ||
// | ||
//public class ReforgingLanguageData extends ReforgingLanguageProvider { | ||
// public ReforgingLanguageData(PackOutput output) { | ||
// super(output); | ||
// } | ||
// | ||
// @Override | ||
// protected void addTranslations() { | ||
// this.addBlock(ReforgingBlocks.VALKYRUM_BLOCK, "Block of Valkyrum"); | ||
// this.addBlock(ReforgingBlocks.PYRAL_BLOCK, "Block of Pyral"); | ||
// | ||
// this.addItem(ReforgingItems.NEPTUNE_MESH, "Neptune Mesh"); | ||
// this.addItem(ReforgingItems.VALKYRUM_INGOT, "Valkyrum Ingot"); | ||
// this.addItem(ReforgingItems.PYRAL_SHARD, "Pyral Shard"); | ||
// this.addItem(ReforgingItems.PYRAL_INGOT, "Pyral Ingot"); | ||
// | ||
// this.addLore(ReforgingItems.NEPTUNE_MESH, "A mesh of interwoven blue metallic links. With the respective template, it can be used in a Smithing Table to forge Neptune armor."); | ||
// this.addLore(ReforgingItems.VALKYRUM_INGOT, "A rare metal utilized by the Valkyries. With the respective template, it can be used in a Smithing Table to forge Valkyrie equipment."); | ||
// this.addLore(ReforgingItems.PYRAL_SHARD, "When combined with obsidian, fragments of Pyral material can be used to craft Pyral Ingots. The shard can also function as a long-lasting fuel."); | ||
// this.addLore(ReforgingItems.PYRAL_INGOT, "A hardened and fire-resistant ingot. With the respective template, it can be used in a Smithing Table to forge Phoenix armor."); | ||
// this.addLore(ReforgingBlocks.VALKYRUM_BLOCK, "A solid block made from Valkyrum Ingots. They can power beacons and be used as decorative accenting."); | ||
// this.addLore(ReforgingBlocks.PYRAL_BLOCK, "A solid block made from Pyral Ingots. They can power beacons and have a fiery look to them."); | ||
// | ||
// this.addPackDescription("mod", "The Aether: Treasure Reforging Resources"); | ||
// } | ||
//} |
30 changes: 15 additions & 15 deletions
30
src/main/java/com/aetherteam/treasure_reforging/data/generators/ReforgingLootTableData.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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
package com.aetherteam.treasure_reforging.data.generators; | ||
|
||
import com.aetherteam.treasure_reforging.data.generators.loot.ReforgingBlockLoot; | ||
import com.aetherteam.treasure_reforging.loot.ReforgingLoot; | ||
import net.minecraft.data.PackOutput; | ||
import net.minecraft.data.loot.LootTableProvider; | ||
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; | ||
|
||
import java.util.List; | ||
|
||
public class ReforgingLootTableData { | ||
public static LootTableProvider create(PackOutput output) { | ||
return new LootTableProvider(output, ReforgingLoot.IMMUTABLE_LOOT_TABLES, List.of( | ||
new LootTableProvider.SubProviderEntry(ReforgingBlockLoot::new, LootContextParamSets.BLOCK) | ||
)); | ||
} | ||
} | ||
//import com.aetherteam.treasure_reforging.data.generators.loot.ReforgingBlockLoot; | ||
//import com.aetherteam.treasure_reforging.loot.ReforgingLoot; | ||
//import net.minecraft.data.PackOutput; | ||
//import net.minecraft.data.loot.LootTableProvider; | ||
//import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; | ||
// | ||
//import java.util.List; | ||
// | ||
//public class ReforgingLootTableData { | ||
// public static LootTableProvider create(PackOutput output) { | ||
// return new LootTableProvider(output, ReforgingLoot.IMMUTABLE_LOOT_TABLES, List.of( | ||
// new LootTableProvider.SubProviderEntry(ReforgingBlockLoot::new, LootContextParamSets.BLOCK) | ||
// )); | ||
// } | ||
//} |
Oops, something went wrong.