its ALMOST THERE I THINK
This commit is contained in:
parent
69e1649037
commit
ac02f3c5d3
|
@ -5,7 +5,7 @@ plugins {
|
|||
id 'org.jetbrains.kotlin.jvm' version '1.6.21'
|
||||
}
|
||||
|
||||
archivesBaseName = "${modID}-common-${minecraftVersion}"
|
||||
version = getVersion("common")
|
||||
|
||||
minecraft {
|
||||
version(minecraftVersion)
|
||||
|
@ -27,6 +27,7 @@ dependencies {
|
|||
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
||||
|
||||
compileOnly "at.petra-k.paucal:paucal-$minecraftVersion:$paucalVersion-common"
|
||||
compileOnly "vazkii.patchouli:Patchouli-xplat:$minecraftVersion-$patchouliVersion"
|
||||
}
|
||||
|
||||
|
|
|
@ -3,12 +3,12 @@ package at.petrak.hexcasting.api.spell.casting
|
|||
import at.petrak.hexcasting.api.advancements.HexAdvancementTriggers
|
||||
import at.petrak.hexcasting.api.block.circle.BlockEntityAbstractImpetus
|
||||
import at.petrak.hexcasting.api.misc.FrozenColorizer
|
||||
import at.petrak.hexcasting.api.mod.HexApiSounds
|
||||
import at.petrak.hexcasting.api.mod.HexStatistics
|
||||
import at.petrak.hexcasting.api.spell.ParticleSpray
|
||||
import at.petrak.hexcasting.api.spell.RenderedSpell
|
||||
import at.petrak.hexcasting.api.spell.mishaps.Mishap
|
||||
import at.petrak.hexcasting.common.lib.HexItems
|
||||
import at.petrak.hexcasting.common.lib.HexSounds
|
||||
import net.minecraft.Util
|
||||
import net.minecraft.network.chat.TranslatableComponent
|
||||
import net.minecraft.sounds.SoundSource
|
||||
|
@ -91,7 +91,7 @@ sealed class OperatorSideEffect {
|
|||
|
||||
harness.ctx.world.playSound(
|
||||
null, harness.ctx.position.x, harness.ctx.position.y, harness.ctx.position.z,
|
||||
HexApiSounds.FAIL_PATTERN, SoundSource.PLAYERS, 1f, 1f
|
||||
HexSounds.FAIL_PATTERN, SoundSource.PLAYERS, 1f, 1f
|
||||
)
|
||||
|
||||
mishap.execute(harness.ctx, errorCtx, harness.stack)
|
||||
|
|
|
@ -25,7 +25,6 @@ import at.petrak.hexcasting.common.lib.HexBlockEntities;
|
|||
import at.petrak.hexcasting.common.lib.HexBlocks;
|
||||
import at.petrak.hexcasting.common.lib.HexItems;
|
||||
import at.petrak.hexcasting.common.lib.HexParticles;
|
||||
import at.petrak.hexcasting.mixin.client.AccessorItemProperties;
|
||||
import at.petrak.hexcasting.xplat.IClientXplatAbstractions;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
import net.minecraft.ChatFormatting;
|
||||
|
@ -57,22 +56,23 @@ public class RegisterClientStuff {
|
|||
registerPackagedSpellOverrides(HexItems.TRINKET);
|
||||
registerPackagedSpellOverrides(HexItems.ARTIFACT);
|
||||
|
||||
AccessorItemProperties.hex$register(HexItems.BATTERY, ItemManaBattery.MANA_PREDICATE,
|
||||
var x = IClientXplatAbstractions.INSTANCE;
|
||||
x.registerItemProperty(HexItems.BATTERY, ItemManaBattery.MANA_PREDICATE,
|
||||
(stack, level, holder, holderID) -> {
|
||||
var item = (ManaHolderItem) stack.getItem();
|
||||
return item.getManaFullness(stack);
|
||||
});
|
||||
AccessorItemProperties.hex$register(HexItems.BATTERY, ItemManaBattery.MAX_MANA_PREDICATE,
|
||||
x.registerItemProperty(HexItems.BATTERY, ItemManaBattery.MAX_MANA_PREDICATE,
|
||||
(stack, level, holder, holderID) -> {
|
||||
var item = (ItemManaBattery) stack.getItem();
|
||||
var max = item.getMaxMana(stack);
|
||||
return (float) Math.sqrt((float) max / HexConfig.common().chargedCrystalManaAmount() / 10);
|
||||
});
|
||||
|
||||
AccessorItemProperties.hex$register(HexItems.SCROLL, ItemScroll.ANCIENT_PREDICATE,
|
||||
x.registerItemProperty(HexItems.SCROLL, ItemScroll.ANCIENT_PREDICATE,
|
||||
(stack, level, holder, holderID) -> stack.getOrCreateTag().contains(ItemScroll.TAG_OP_ID) ? 1f : 0f);
|
||||
|
||||
AccessorItemProperties.hex$register(HexItems.SLATE, ItemSlate.WRITTEN_PRED,
|
||||
x.registerItemProperty(HexItems.SLATE, ItemSlate.WRITTEN_PRED,
|
||||
(stack, level, holder, holderID) -> ItemSlate.hasPattern(stack) ? 1f : 0f);
|
||||
|
||||
registerWandOverrides(HexItems.WAND_OAK);
|
||||
|
@ -85,7 +85,6 @@ public class RegisterClientStuff {
|
|||
|
||||
HexTooltips.init();
|
||||
|
||||
IClientXplatAbstractions x = IClientXplatAbstractions.INSTANCE;
|
||||
x.setRenderLayer(HexBlocks.CONJURED_LIGHT, RenderType.cutout());
|
||||
x.setRenderLayer(HexBlocks.CONJURED_BLOCK, RenderType.cutout());
|
||||
x.setRenderLayer(HexBlocks.AKASHIC_DOOR, RenderType.cutout());
|
||||
|
@ -193,7 +192,7 @@ public class RegisterClientStuff {
|
|||
}
|
||||
|
||||
private static void registerDataHolderOverrides(DataHolderItem item) {
|
||||
AccessorItemProperties.hex$register((Item) item, ItemFocus.DATATYPE_PRED,
|
||||
IClientXplatAbstractions.INSTANCE.registerItemProperty((Item) item, ItemFocus.DATATYPE_PRED,
|
||||
(stack, level, holder, holderID) -> {
|
||||
var datum = item.readDatumTag(stack);
|
||||
if (datum != null) {
|
||||
|
@ -210,19 +209,19 @@ public class RegisterClientStuff {
|
|||
}
|
||||
return 0f;
|
||||
});
|
||||
AccessorItemProperties.hex$register((Item) item, ItemFocus.SEALED_PRED,
|
||||
IClientXplatAbstractions.INSTANCE.registerItemProperty((Item) item, ItemFocus.SEALED_PRED,
|
||||
(stack, level, holder, holderID) -> item.canWrite(stack, SpellDatum.make(Widget.NULL)) ? 0f : 1f);
|
||||
}
|
||||
|
||||
private static void registerPackagedSpellOverrides(ItemPackagedHex item) {
|
||||
AccessorItemProperties.hex$register(item, ItemPackagedHex.HAS_PATTERNS_PRED,
|
||||
IClientXplatAbstractions.INSTANCE.registerItemProperty(item, ItemPackagedHex.HAS_PATTERNS_PRED,
|
||||
(stack, level, holder, holderID) ->
|
||||
item.getPatterns(stack) != null ? 1f : 0f
|
||||
);
|
||||
}
|
||||
|
||||
private static void registerWandOverrides(ItemWand item) {
|
||||
AccessorItemProperties.hex$register(item, ItemWand.FUNNY_LEVEL_PREDICATE,
|
||||
IClientXplatAbstractions.INSTANCE.registerItemProperty(item, ItemWand.FUNNY_LEVEL_PREDICATE,
|
||||
(stack, level, holder, holderID) -> {
|
||||
var name = stack.getHoverName().getString().toLowerCase(Locale.ROOT);
|
||||
if (name.contains("old")) {
|
||||
|
|
|
@ -2,7 +2,7 @@ package at.petrak.hexcasting.common.items.colorizer;
|
|||
|
||||
import at.petrak.hexcasting.api.addldata.Colorizer;
|
||||
import at.petrak.hexcasting.api.item.ColorizerItem;
|
||||
import at.petrak.paucal.api.contrib.Contributors;
|
||||
import at.petrak.paucal.api.PaucalAPI;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
@ -20,10 +20,10 @@ public class ItemUUIDColorizer extends Item implements ColorizerItem {
|
|||
|
||||
@Override
|
||||
public int color(ItemStack stack, UUID owner, float time, Vec3 position) {
|
||||
var contributor = Contributors.getContributor(owner);
|
||||
var contributor = PaucalAPI.instance().getContributor(owner);
|
||||
if (contributor != null) {
|
||||
Object colorObj = contributor.getRaw("hexcasting:colorizer");
|
||||
if (colorObj instanceof List<?> colorList) {
|
||||
List<?> colorList = contributor.get("hexcasting:colorizer");
|
||||
if (colorList != null) {
|
||||
var colors = new int[colorList.size()];
|
||||
var ok = true;
|
||||
for (int i = 0; i < colorList.size(); i++) {
|
||||
|
|
|
@ -167,7 +167,7 @@ public class HexBlocks {
|
|||
.strength(1f)
|
||||
.lightLevel($ -> 15)));
|
||||
|
||||
public static final Block AKASHIC_LOG = blockItem("akashic_log",
|
||||
public static final BlockAxis AKASHIC_LOG = blockItem("akashic_log",
|
||||
new BlockAkashicLog(akashicWoody()));
|
||||
public static final BlockAxis AKASHIC_LOG_STRIPPED = blockItem("akashic_log_stripped",
|
||||
new BlockAkashicLog(akashicWoody()));
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package at.petrak.hexcasting.common.recipe;
|
||||
|
||||
import at.petrak.hexcasting.annotations.SoftImplement;
|
||||
import at.petrak.hexcasting.common.recipe.ingredient.StateIngredient;
|
||||
import at.petrak.hexcasting.common.recipe.ingredient.StateIngredientHelper;
|
||||
import at.petrak.hexcasting.common.recipe.ingredient.VillagerIngredient;
|
||||
|
@ -90,5 +91,10 @@ public record BrainsweepRecipe(
|
|||
var result = Block.stateById(buf.readVarInt());
|
||||
return new BrainsweepRecipe(recipeID, blockIn, villagerIn, result);
|
||||
}
|
||||
|
||||
@SoftImplement("forge")
|
||||
public Class<RecipeSerializer> getRegistryType() {
|
||||
return RecipeSerializer.class;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
package at.petrak.hexcasting.mixin.client;
|
||||
|
||||
import net.minecraft.client.renderer.item.ClampedItemPropertyFunction;
|
||||
import net.minecraft.client.renderer.item.ItemProperties;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.Item;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Invoker;
|
||||
|
||||
@Mixin(ItemProperties.class)
|
||||
public interface AccessorItemProperties {
|
||||
@Invoker("register")
|
||||
static void hex$register(Item $$0, ResourceLocation $$1, ClampedItemPropertyFunction $$2) {
|
||||
}
|
||||
}
|
|
@ -7,11 +7,14 @@ import net.minecraft.client.particle.ParticleProvider;
|
|||
import net.minecraft.client.particle.SpriteSet;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.entity.EntityRendererProvider;
|
||||
import net.minecraft.client.renderer.item.ItemPropertyFunction;
|
||||
import net.minecraft.core.particles.ParticleOptions;
|
||||
import net.minecraft.core.particles.ParticleType;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.inventory.tooltip.TooltipComponent;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
||||
import java.util.ServiceLoader;
|
||||
|
@ -30,6 +33,8 @@ public interface IClientXplatAbstractions {
|
|||
|
||||
<T extends ClientTooltipComponent & TooltipComponent> void registerIdentityTooltipMapping(Class<T> clazz);
|
||||
|
||||
void registerItemProperty(Item item, ResourceLocation id, ItemPropertyFunction func);
|
||||
|
||||
IClientXplatAbstractions INSTANCE = find();
|
||||
|
||||
private static IClientXplatAbstractions find() {
|
||||
|
|
|
@ -4,7 +4,7 @@ plugins {
|
|||
id 'idea'
|
||||
}
|
||||
|
||||
archivesBaseName = "${modName}-fabric-${minecraftVersion}"
|
||||
version = getVersion("fabric")
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
@ -28,6 +28,7 @@ dependencies {
|
|||
|
||||
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
|
||||
|
||||
modImplementation "at.petra-k.paucal:paucal-$minecraftVersion:$paucalVersion-fabric"
|
||||
modImplementation("vazkii.patchouli:Patchouli:$minecraftVersion-$patchouliVersion:api")
|
||||
|
||||
modImplementation("net.fabricmc:fabric-language-kotlin:1.7.4+kotlin.1.6.21")
|
||||
|
@ -40,22 +41,29 @@ dependencies {
|
|||
}
|
||||
|
||||
loom {
|
||||
mixin.defaultRefmapName = "hexcasting.refmap.json"
|
||||
|
||||
runs {
|
||||
client {
|
||||
client()
|
||||
setConfigName("Fabric Client")
|
||||
ideConfigGenerated(true)
|
||||
runDir("run")
|
||||
runDir("Fabric/run")
|
||||
}
|
||||
server {
|
||||
server()
|
||||
setConfigName("Fabric Server")
|
||||
ideConfigGenerated(true)
|
||||
runDir("run")
|
||||
runDir("Fabric/run")
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.main.resources {
|
||||
srcDir 'src/generated/resources'
|
||||
srcDir '../Common/src/generated/resources'
|
||||
}
|
||||
|
||||
processResources {
|
||||
from project(":Common").sourceSets.main.resources
|
||||
|
|
|
@ -8,16 +8,25 @@ import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry;
|
|||
import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry;
|
||||
import net.fabricmc.fabric.api.client.rendering.v1.TooltipComponentCallback;
|
||||
import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.client.particle.ParticleProvider;
|
||||
import net.minecraft.client.particle.SpriteSet;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.entity.EntityRendererProvider;
|
||||
import net.minecraft.client.renderer.item.ClampedItemPropertyFunction;
|
||||
import net.minecraft.client.renderer.item.ItemProperties;
|
||||
import net.minecraft.client.renderer.item.ItemPropertyFunction;
|
||||
import net.minecraft.core.particles.ParticleOptions;
|
||||
import net.minecraft.core.particles.ParticleType;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.inventory.tooltip.TooltipComponent;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
|
@ -53,4 +62,23 @@ public class FabricClientXplatImpl implements IClientXplatAbstractions {
|
|||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
// suck it fabric trying to be "safe"
|
||||
private record UnclampedClampedItemPropFunc(ItemPropertyFunction inner) implements ClampedItemPropertyFunction {
|
||||
@Override
|
||||
public float unclampedCall(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity,
|
||||
int seed) {
|
||||
return inner.call(stack, level, entity, seed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float call(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int seed) {
|
||||
return this.unclampedCall(stack, level, entity, seed);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerItemProperty(Item item, ResourceLocation id, ItemPropertyFunction func) {
|
||||
ItemProperties.register(item, id, new UnclampedClampedItemPropFunc(func));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
]
|
||||
},
|
||||
"mixins": [
|
||||
"hexplat.mixins.json",
|
||||
"fabricasting.mixins.json"
|
||||
],
|
||||
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
maven { url = 'https://maven.minecraftforge.net' }
|
||||
maven {
|
||||
url = 'https://repo.spongepowered.org/repository/maven-public/'
|
||||
content { includeGroup "org.spongepowered" }
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
|
@ -8,14 +12,16 @@ buildscript {
|
|||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
|
||||
// OPTIONAL Kotlin Serialization plugin
|
||||
classpath 'org.jetbrains.kotlin:kotlin-serialization:1.6.10'
|
||||
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'net.minecraftforge.gradle'
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'org.spongepowered.mixin'
|
||||
|
||||
archivesBaseName = "${modID}-forge-${minecraftVersion}"
|
||||
version = getVersion("forge")
|
||||
|
||||
// Adds the Kotlin Gradle plugin
|
||||
buildscript {
|
||||
|
@ -46,13 +52,13 @@ minecraft {
|
|||
|
||||
runs {
|
||||
client {
|
||||
workingDirectory project.file('../run')
|
||||
workingDirectory project.file('run')
|
||||
ideaModule "${rootProject.name}.${project.name}.main"
|
||||
taskName 'Client'
|
||||
property 'mixin.env.remapRefMap', 'true'
|
||||
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
|
||||
mods {
|
||||
modClientRun {
|
||||
create(modID) {
|
||||
source sourceSets.main
|
||||
source project(":Common").sourceSets.main
|
||||
}
|
||||
|
@ -60,21 +66,26 @@ minecraft {
|
|||
}
|
||||
|
||||
server {
|
||||
workingDirectory project.file('../run')
|
||||
workingDirectory project.file('run')
|
||||
ideaModule "${rootProject.name}.${project.name}.main"
|
||||
taskName 'Server'
|
||||
property 'mixin.env.remapRefMap', 'true'
|
||||
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
|
||||
mods {
|
||||
modServerRun {
|
||||
create(modID) {
|
||||
source sourceSets.main
|
||||
source project(":Common").sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We have to have a dummy data run to be parented from
|
||||
data {}
|
||||
|
||||
xplatDatagen {
|
||||
workingDirectory project.file('../run')
|
||||
parent minecraft.runs.data
|
||||
|
||||
workingDirectory project.file('run')
|
||||
ideaModule "${rootProject.name}.${project.name}.main"
|
||||
args '--mod', modID, '--all', '--output', file('../Common/src/generated/resources/'), '--existing', file('../Common/src/main/resources/')
|
||||
taskName 'Xplat Data'
|
||||
|
@ -82,7 +93,7 @@ minecraft {
|
|||
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
|
||||
property 'hexcasting.xplat_datagen', 'true'
|
||||
mods {
|
||||
modDataRun {
|
||||
create(modID) {
|
||||
source sourceSets.main
|
||||
source project(":Common").sourceSets.main
|
||||
}
|
||||
|
@ -90,14 +101,16 @@ minecraft {
|
|||
}
|
||||
|
||||
forgeDatagen {
|
||||
workingDirectory project.file('../run')
|
||||
parent minecraft.runs.data
|
||||
|
||||
workingDirectory project.file('run')
|
||||
ideaModule "${rootProject.name}.${project.name}.main"
|
||||
args '--mod', modID, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
|
||||
taskName 'Data'
|
||||
property 'mixin.env.remapRefMap', 'true'
|
||||
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
|
||||
mods {
|
||||
modDataRun {
|
||||
create(modID) {
|
||||
source sourceSets.main
|
||||
source project(":Common").sourceSets.main
|
||||
}
|
||||
|
@ -142,8 +155,8 @@ dependencies {
|
|||
|
||||
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
|
||||
|
||||
compileOnly fg.deobf("at.petra-k.paucal:paucal-$minecraftVersion:$paucalVersion")
|
||||
runtimeOnly fg.deobf("at.petra-k.paucal:paucal-$minecraftVersion:$paucalVersion")
|
||||
compileOnly fg.deobf("at.petra-k.paucal:paucal-$minecraftVersion:$paucalVersion-forge")
|
||||
runtimeOnly fg.deobf("at.petra-k.paucal:paucal-$minecraftVersion:$paucalVersion-forge")
|
||||
compileOnly fg.deobf("vazkii.patchouli:Patchouli:$minecraftVersion-$patchouliVersion:api")
|
||||
runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:$minecraftVersion-$patchouliVersion")
|
||||
|
||||
|
@ -152,12 +165,28 @@ dependencies {
|
|||
runtimeOnly fg.deobf("mezz.jei:jei-$minecraftVersion:$jeiVersion")
|
||||
}
|
||||
|
||||
mixin {
|
||||
add sourceSets.main, "hexcasting.refmap.json"
|
||||
config "hexplat.mixins.json"
|
||||
}
|
||||
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
source(project(":Common").sourceSets.main.allSource)
|
||||
}
|
||||
|
||||
sourceSets.main.resources {
|
||||
srcDir 'src/generated/resources'
|
||||
srcDir '../Common/src/generated/resources'
|
||||
}
|
||||
|
||||
processResources {
|
||||
from project(":Common").sourceSets.main.resources
|
||||
inputs.property "version", project.version
|
||||
|
||||
filesMatching("mods.toml") {
|
||||
expand "version": project.version
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import at.petrak.hexcasting.api.advancements.FailToCastGreatSpellTrigger;
|
|||
import at.petrak.hexcasting.api.advancements.OvercastTrigger;
|
||||
import at.petrak.hexcasting.api.advancements.SpendManaTrigger;
|
||||
import at.petrak.hexcasting.common.lib.HexItems;
|
||||
import at.petrak.paucal.api.datagen.PaucalAdvancementProvider;
|
||||
import at.petrak.paucal.api.forge.datagen.PaucalAdvancementProvider;
|
||||
import net.minecraft.advancements.Advancement;
|
||||
import net.minecraft.advancements.DisplayInfo;
|
||||
import net.minecraft.advancements.FrameType;
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package at.petrak.hexcasting.forge.datagen;
|
||||
|
||||
import at.petrak.hexcasting.HexMod;
|
||||
import at.petrak.hexcasting.api.HexAPI;
|
||||
import at.petrak.hexcasting.api.block.circle.BlockCircleComponent;
|
||||
import at.petrak.hexcasting.api.spell.DatumType;
|
||||
import at.petrak.hexcasting.common.blocks.akashic.BlockAkashicBookshelf;
|
||||
import at.petrak.hexcasting.common.blocks.circles.BlockSlate;
|
||||
import at.petrak.hexcasting.common.blocks.circles.directrix.BlockRedstoneDirectrix;
|
||||
import at.petrak.hexcasting.common.lib.HexBlocks;
|
||||
import at.petrak.paucal.api.datagen.PaucalBlockStateAndModelProvider;
|
||||
import at.petrak.paucal.api.forge.datagen.PaucalBlockStateAndModelProvider;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
@ -19,13 +19,13 @@ import net.minecraftforge.common.data.ExistingFileHelper;
|
|||
|
||||
public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider {
|
||||
public HexBlockStatesAndModels(DataGenerator gen, ExistingFileHelper exFileHelper) {
|
||||
super(gen, HexMod.MOD_ID, exFileHelper);
|
||||
super(gen, HexAPI.MOD_ID, exFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerStatesAndModels() {
|
||||
var slateModel = models().getExistingFile(modLoc("slate"));
|
||||
getVariantBuilder(HexBlocks.SLATE.get()).forAllStatesExcept(bs -> {
|
||||
getVariantBuilder(HexBlocks.SLATE).forAllStatesExcept(bs -> {
|
||||
int rotationX = 0;
|
||||
int rotationY = 0;
|
||||
switch (bs.getValue(BlockSlate.ATTACH_FACE)) {
|
||||
|
@ -43,10 +43,10 @@ public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider {
|
|||
.build();
|
||||
}, BlockSlate.WATERLOGGED);
|
||||
|
||||
impetus(HexBlocks.IMPETUS_RIGHTCLICK.get(), "impetus_rightclick", "rightclick");
|
||||
impetus(HexBlocks.IMPETUS_LOOK.get(), "impetus_look", "look");
|
||||
impetus(HexBlocks.IMPETUS_STOREDPLAYER.get(), "impetus_storedplayer", "storedplayer");
|
||||
arrowCircleBlock(HexBlocks.EMPTY_IMPETUS.get(), "empty_impetus", modLoc("block/slate"),
|
||||
impetus(HexBlocks.IMPETUS_RIGHTCLICK, "impetus_rightclick", "rightclick");
|
||||
impetus(HexBlocks.IMPETUS_LOOK, "impetus_look", "look");
|
||||
impetus(HexBlocks.IMPETUS_STOREDPLAYER, "impetus_storedplayer", "storedplayer");
|
||||
arrowCircleBlock(HexBlocks.EMPTY_IMPETUS, "empty_impetus", modLoc("block/slate"),
|
||||
"impetus/front_empty",
|
||||
"impetus/back_empty",
|
||||
"impetus/up_empty",
|
||||
|
@ -56,7 +56,7 @@ public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider {
|
|||
);
|
||||
|
||||
// auugh
|
||||
getVariantBuilder(HexBlocks.DIRECTRIX_REDSTONE.get()).forAllStates(bs -> {
|
||||
getVariantBuilder(HexBlocks.DIRECTRIX_REDSTONE).forAllStates(bs -> {
|
||||
var isLit = bs.getValue(BlockCircleComponent.ENERGIZED);
|
||||
var litness = isLit ? "lit" : "dim";
|
||||
var isPowered = bs.getValue(BlockRedstoneDirectrix.REDSTONE_POWERED);
|
||||
|
@ -76,13 +76,13 @@ public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider {
|
|||
var model = models().cube(modelName, routing[0], routing[1], routing[2], routing[3], routing[4], routing[5])
|
||||
.texture("particle", modLoc("block/slate"));
|
||||
if (!isLit && !isPowered && dir == Direction.NORTH) {
|
||||
simpleBlockItem(HexBlocks.DIRECTRIX_REDSTONE.get(), model);
|
||||
simpleBlockItem(HexBlocks.DIRECTRIX_REDSTONE, model);
|
||||
}
|
||||
return ConfiguredModel.builder()
|
||||
.modelFile(model)
|
||||
.build();
|
||||
});
|
||||
getVariantBuilder(HexBlocks.EMPTY_DIRECTRIX.get()).forAllStates(bs -> {
|
||||
getVariantBuilder(HexBlocks.EMPTY_DIRECTRIX).forAllStates(bs -> {
|
||||
var isLit = bs.getValue(BlockCircleComponent.ENERGIZED);
|
||||
var litness = isLit ? "lit" : "dim";
|
||||
var axis = bs.getValue(BlockStateProperties.AXIS);
|
||||
|
@ -114,7 +114,7 @@ public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider {
|
|||
var model = models().cube(modelName, y, y, z, z, x, x)
|
||||
.texture("particle", modLoc("block/slate"));
|
||||
if (!isLit && axis == Direction.Axis.Z) {
|
||||
simpleBlockItem(HexBlocks.EMPTY_DIRECTRIX.get(), model);
|
||||
simpleBlockItem(HexBlocks.EMPTY_DIRECTRIX, model);
|
||||
}
|
||||
return ConfiguredModel.builder()
|
||||
.modelFile(model)
|
||||
|
@ -122,12 +122,12 @@ public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider {
|
|||
});
|
||||
|
||||
var akashicRecordModel = models().getExistingFile(modLoc("block/akashic_record"));
|
||||
simpleBlock(HexBlocks.AKASHIC_RECORD.get(), akashicRecordModel);
|
||||
simpleBlockItem(HexBlocks.AKASHIC_RECORD.get(), akashicRecordModel);
|
||||
blockAndItem(HexBlocks.AKASHIC_CONNECTOR.get(),
|
||||
simpleBlock(HexBlocks.AKASHIC_RECORD, akashicRecordModel);
|
||||
simpleBlockItem(HexBlocks.AKASHIC_RECORD, akashicRecordModel);
|
||||
blockAndItem(HexBlocks.AKASHIC_CONNECTOR,
|
||||
models().cubeAll("akashic_connector", modLoc("block/akashic/connector")));
|
||||
|
||||
getVariantBuilder(HexBlocks.AKASHIC_BOOKSHELF.get()).forAllStates(bs -> {
|
||||
getVariantBuilder(HexBlocks.AKASHIC_BOOKSHELF).forAllStates(bs -> {
|
||||
var type = bs.getValue(BlockAkashicBookshelf.DATUM_TYPE);
|
||||
|
||||
var side = modLoc("block/akashic/bookshelf/side");
|
||||
|
@ -152,7 +152,7 @@ public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider {
|
|||
|
||||
Direction dir = bs.getValue(BlockAkashicBookshelf.FACING);
|
||||
if (dir == Direction.NORTH && type == DatumType.EMPTY) {
|
||||
simpleBlockItem(HexBlocks.AKASHIC_BOOKSHELF.get(), model);
|
||||
simpleBlockItem(HexBlocks.AKASHIC_BOOKSHELF, model);
|
||||
}
|
||||
|
||||
builder.modelFile(model)
|
||||
|
@ -167,51 +167,51 @@ public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider {
|
|||
});
|
||||
|
||||
|
||||
blockAndItem(HexBlocks.SLATE_BLOCK.get(), models().cubeAll("slate_block", modLoc("block/slate")));
|
||||
cubeBlockAndItem(HexBlocks.AMETHYST_DUST_BLOCK.get(), "amethyst_dust_block");
|
||||
cubeBlockAndItem(HexBlocks.AMETHYST_TILES.get(), "amethyst_tiles");
|
||||
cubeBlockAndItem(HexBlocks.SCROLL_PAPER.get(), "scroll_paper");
|
||||
cubeBlockAndItem(HexBlocks.ANCIENT_SCROLL_PAPER.get(), "ancient_scroll_paper");
|
||||
blockAndItem(HexBlocks.SLATE_BLOCK, models().cubeAll("slate_block", modLoc("block/slate")));
|
||||
cubeBlockAndItem(HexBlocks.AMETHYST_DUST_BLOCK, "amethyst_dust_block");
|
||||
cubeBlockAndItem(HexBlocks.AMETHYST_TILES, "amethyst_tiles");
|
||||
cubeBlockAndItem(HexBlocks.SCROLL_PAPER, "scroll_paper");
|
||||
cubeBlockAndItem(HexBlocks.ANCIENT_SCROLL_PAPER, "ancient_scroll_paper");
|
||||
|
||||
blockAndItem(HexBlocks.SCROLL_PAPER_LANTERN.get(), models().cubeBottomTop("scroll_paper_lantern",
|
||||
blockAndItem(HexBlocks.SCROLL_PAPER_LANTERN, models().cubeBottomTop("scroll_paper_lantern",
|
||||
modLoc("block/scroll_paper_lantern_side"),
|
||||
modLoc("block/scroll_paper_lantern_bottom"),
|
||||
modLoc("block/scroll_paper_lantern_top")));
|
||||
|
||||
blockAndItem(HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN.get(),
|
||||
blockAndItem(HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN,
|
||||
models().cubeBottomTop("ancient_scroll_paper_lantern",
|
||||
modLoc("block/ancient_scroll_paper_lantern_side"),
|
||||
modLoc("block/ancient_scroll_paper_lantern_bottom"),
|
||||
modLoc("block/ancient_scroll_paper_lantern_top")));
|
||||
|
||||
axisBlock(HexBlocks.AKASHIC_LOG.get(), modLoc("block/akashic/log"), modLoc("block/akashic/log_end"));
|
||||
axisBlock(HexBlocks.AKASHIC_LOG_STRIPPED.get(), modLoc("block/akashic/log_stripped"),
|
||||
axisBlock(HexBlocks.AKASHIC_LOG, modLoc("block/akashic/log"), modLoc("block/akashic/log_end"));
|
||||
axisBlock(HexBlocks.AKASHIC_LOG_STRIPPED, modLoc("block/akashic/log_stripped"),
|
||||
modLoc("block/akashic/log_end_stripped"));
|
||||
|
||||
blockAndItem(HexBlocks.AKASHIC_WOOD.get(), models().cubeAll("akashic_wood", modLoc("block/akashic/log")));
|
||||
blockAndItem(HexBlocks.AKASHIC_WOOD_STRIPPED.get(),
|
||||
blockAndItem(HexBlocks.AKASHIC_WOOD, models().cubeAll("akashic_wood", modLoc("block/akashic/log")));
|
||||
blockAndItem(HexBlocks.AKASHIC_WOOD_STRIPPED,
|
||||
models().cubeAll("akashic_wood_stripped", modLoc("block/akashic/log_stripped")));
|
||||
blockAndItem(HexBlocks.AKASHIC_PANEL.get(), models().cubeAll("akashic_panel", modLoc("block/akashic/panel")));
|
||||
blockAndItem(HexBlocks.AKASHIC_TILE.get(), models().cubeAll("akashic_tile", modLoc("block/akashic/tile")));
|
||||
blockAndItem(HexBlocks.AKASHIC_PANEL, models().cubeAll("akashic_panel", modLoc("block/akashic/panel")));
|
||||
blockAndItem(HexBlocks.AKASHIC_TILE, models().cubeAll("akashic_tile", modLoc("block/akashic/tile")));
|
||||
|
||||
ResourceLocation leavesParent = new ResourceLocation("block/leaves");
|
||||
blockAndItem(HexBlocks.AKASHIC_LEAVES1.get(),
|
||||
blockAndItem(HexBlocks.AKASHIC_LEAVES1,
|
||||
models().withExistingParent("akashic_leaves1", leavesParent)
|
||||
.texture("all", modLoc("block/akashic/leaves1")));
|
||||
blockAndItem(HexBlocks.AKASHIC_LEAVES2.get(),
|
||||
blockAndItem(HexBlocks.AKASHIC_LEAVES2,
|
||||
models().withExistingParent("akashic_leaves2", leavesParent)
|
||||
.texture("all", modLoc("block/akashic/leaves2")));
|
||||
blockAndItem(HexBlocks.AKASHIC_LEAVES3.get(),
|
||||
blockAndItem(HexBlocks.AKASHIC_LEAVES3,
|
||||
models().withExistingParent("akashic_leaves3", leavesParent)
|
||||
.texture("all", modLoc("block/akashic/leaves3")));
|
||||
|
||||
doorBlock(HexBlocks.AKASHIC_DOOR.get(), modLoc("block/akashic/door_lower"), modLoc("block/akashic/door_upper"));
|
||||
doorBlock(HexBlocks.AKASHIC_DOOR, modLoc("block/akashic/door_lower"), modLoc("block/akashic/door_upper"));
|
||||
// door model via the given texture
|
||||
trapdoorBlock(HexBlocks.AKASHIC_TRAPDOOR.get(), modLoc("block/akashic/trapdoor"), true);
|
||||
trapdoorBlock(HexBlocks.AKASHIC_TRAPDOOR, modLoc("block/akashic/trapdoor"), true);
|
||||
|
||||
ResourceLocation planks1 = modLoc("block/akashic/planks1");
|
||||
BlockModelBuilder planks_model = models().cubeAll("akashic_planks1", planks1);
|
||||
simpleBlock(HexBlocks.AKASHIC_PLANKS.get(), ConfiguredModel.builder()
|
||||
simpleBlock(HexBlocks.AKASHIC_PLANKS, ConfiguredModel.builder()
|
||||
.modelFile(planks_model)
|
||||
.weight(3)
|
||||
.nextModel()
|
||||
|
@ -220,17 +220,16 @@ public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider {
|
|||
.nextModel()
|
||||
.modelFile(models().cubeAll("akashic_planks3", modLoc("block/akashic/planks3")))
|
||||
.build());
|
||||
simpleBlockItem(HexBlocks.AKASHIC_PLANKS.get(),
|
||||
planks_model);
|
||||
simpleBlockItem(HexBlocks.AKASHIC_PLANKS, planks_model);
|
||||
|
||||
stairsBlock(HexBlocks.AKASHIC_STAIRS.get(), planks1);
|
||||
slabBlock(HexBlocks.AKASHIC_SLAB.get(), modLoc("block/akashic_planks1"), planks1);
|
||||
buttonBlock(HexBlocks.AKASHIC_BUTTON.get(), planks1);
|
||||
pressurePlateBlock(HexBlocks.AKASHIC_PRESSURE_PLATE.get(), planks1);
|
||||
stairsBlock(HexBlocks.AKASHIC_STAIRS, planks1);
|
||||
slabBlock(HexBlocks.AKASHIC_SLAB, modLoc("block/akashic_planks1"), planks1);
|
||||
buttonBlock(HexBlocks.AKASHIC_BUTTON, planks1);
|
||||
pressurePlateBlock(HexBlocks.AKASHIC_PRESSURE_PLATE, planks1);
|
||||
|
||||
var sconceModel = models().getExistingFile(modLoc("amethyst_sconce"));
|
||||
simpleBlock(HexBlocks.SCONCE.get(), sconceModel);
|
||||
simpleBlockItem(HexBlocks.SCONCE.get(), sconceModel);
|
||||
simpleBlock(HexBlocks.SCONCE, sconceModel);
|
||||
simpleBlockItem(HexBlocks.SCONCE, sconceModel);
|
||||
}
|
||||
|
||||
private void impetus(Block block, String name, String stub) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package at.petrak.hexcasting.forge.datagen;
|
||||
|
||||
import at.petrak.hexcasting.HexMod;
|
||||
import at.petrak.hexcasting.api.HexAPI;
|
||||
import at.petrak.hexcasting.common.lib.HexBlockTags;
|
||||
import at.petrak.hexcasting.common.lib.HexBlocks;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
|
@ -12,71 +12,71 @@ import org.jetbrains.annotations.Nullable;
|
|||
public class HexBlockTagProvider extends BlockTagsProvider {
|
||||
public HexBlockTagProvider(DataGenerator pGenerator,
|
||||
@Nullable ExistingFileHelper existingFileHelper) {
|
||||
super(pGenerator, HexMod.MOD_ID, existingFileHelper);
|
||||
super(pGenerator, HexAPI.MOD_ID, existingFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addTags() {
|
||||
tag(BlockTags.MINEABLE_WITH_PICKAXE)
|
||||
.add(HexBlocks.SLATE_BLOCK.get(), HexBlocks.SLATE.get(),
|
||||
HexBlocks.EMPTY_DIRECTRIX.get(), HexBlocks.DIRECTRIX_REDSTONE.get(),
|
||||
HexBlocks.EMPTY_IMPETUS.get(),
|
||||
HexBlocks.IMPETUS_RIGHTCLICK.get(), HexBlocks.IMPETUS_LOOK.get(), HexBlocks.IMPETUS_STOREDPLAYER.get(),
|
||||
HexBlocks.AMETHYST_TILES.get(), HexBlocks.SCONCE.get());
|
||||
.add(HexBlocks.SLATE_BLOCK, HexBlocks.SLATE,
|
||||
HexBlocks.EMPTY_DIRECTRIX, HexBlocks.DIRECTRIX_REDSTONE,
|
||||
HexBlocks.EMPTY_IMPETUS,
|
||||
HexBlocks.IMPETUS_RIGHTCLICK, HexBlocks.IMPETUS_LOOK, HexBlocks.IMPETUS_STOREDPLAYER,
|
||||
HexBlocks.AMETHYST_TILES, HexBlocks.SCONCE);
|
||||
|
||||
tag(BlockTags.MINEABLE_WITH_SHOVEL)
|
||||
.add(HexBlocks.AMETHYST_DUST_BLOCK.get());
|
||||
.add(HexBlocks.AMETHYST_DUST_BLOCK);
|
||||
|
||||
tag(BlockTags.MINEABLE_WITH_AXE)
|
||||
.add(HexBlocks.AKASHIC_RECORD.get(), HexBlocks.AKASHIC_BOOKSHELF.get(), HexBlocks.AKASHIC_CONNECTOR.get(),
|
||||
HexBlocks.AKASHIC_LOG.get(), HexBlocks.AKASHIC_LOG_STRIPPED.get(),
|
||||
HexBlocks.AKASHIC_WOOD.get(), HexBlocks.AKASHIC_WOOD_STRIPPED.get(),
|
||||
HexBlocks.AKASHIC_PLANKS.get(), HexBlocks.AKASHIC_PANEL.get(), HexBlocks.AKASHIC_TILE.get(),
|
||||
HexBlocks.AKASHIC_DOOR.get(), HexBlocks.AKASHIC_TRAPDOOR.get(), HexBlocks.AKASHIC_SLAB.get(),
|
||||
HexBlocks.AKASHIC_BUTTON.get());
|
||||
.add(HexBlocks.AKASHIC_RECORD, HexBlocks.AKASHIC_BOOKSHELF, HexBlocks.AKASHIC_CONNECTOR,
|
||||
HexBlocks.AKASHIC_LOG, HexBlocks.AKASHIC_LOG_STRIPPED,
|
||||
HexBlocks.AKASHIC_WOOD, HexBlocks.AKASHIC_WOOD_STRIPPED,
|
||||
HexBlocks.AKASHIC_PLANKS, HexBlocks.AKASHIC_PANEL, HexBlocks.AKASHIC_TILE,
|
||||
HexBlocks.AKASHIC_DOOR, HexBlocks.AKASHIC_TRAPDOOR, HexBlocks.AKASHIC_SLAB,
|
||||
HexBlocks.AKASHIC_BUTTON);
|
||||
|
||||
tag(BlockTags.MINEABLE_WITH_HOE)
|
||||
.add(HexBlocks.AKASHIC_LEAVES1.get(), HexBlocks.AKASHIC_LEAVES2.get(), HexBlocks.AKASHIC_LEAVES3.get());
|
||||
.add(HexBlocks.AKASHIC_LEAVES1, HexBlocks.AKASHIC_LEAVES2, HexBlocks.AKASHIC_LEAVES3);
|
||||
|
||||
tag(BlockTags.CRYSTAL_SOUND_BLOCKS)
|
||||
.add(HexBlocks.CONJURED_LIGHT.get(), HexBlocks.CONJURED_BLOCK.get(), HexBlocks.AMETHYST_TILES.get(),
|
||||
HexBlocks.SCONCE.get());
|
||||
.add(HexBlocks.CONJURED_LIGHT, HexBlocks.CONJURED_BLOCK, HexBlocks.AMETHYST_TILES,
|
||||
HexBlocks.SCONCE);
|
||||
|
||||
tag(HexBlockTags.AKASHIC_LOGS)
|
||||
.add(HexBlocks.AKASHIC_LOG.get(), HexBlocks.AKASHIC_LOG_STRIPPED.get(),
|
||||
HexBlocks.AKASHIC_WOOD.get(), HexBlocks.AKASHIC_WOOD_STRIPPED.get());
|
||||
.add(HexBlocks.AKASHIC_LOG, HexBlocks.AKASHIC_LOG_STRIPPED,
|
||||
HexBlocks.AKASHIC_WOOD, HexBlocks.AKASHIC_WOOD_STRIPPED);
|
||||
tag(BlockTags.LOGS)
|
||||
.add(HexBlocks.AKASHIC_LOG.get(), HexBlocks.AKASHIC_LOG_STRIPPED.get(),
|
||||
HexBlocks.AKASHIC_WOOD.get(), HexBlocks.AKASHIC_WOOD_STRIPPED.get());
|
||||
.add(HexBlocks.AKASHIC_LOG, HexBlocks.AKASHIC_LOG_STRIPPED,
|
||||
HexBlocks.AKASHIC_WOOD, HexBlocks.AKASHIC_WOOD_STRIPPED);
|
||||
tag(BlockTags.LOGS_THAT_BURN)
|
||||
.add(HexBlocks.AKASHIC_LOG.get(), HexBlocks.AKASHIC_LOG_STRIPPED.get(),
|
||||
HexBlocks.AKASHIC_WOOD.get(), HexBlocks.AKASHIC_WOOD_STRIPPED.get());
|
||||
.add(HexBlocks.AKASHIC_LOG, HexBlocks.AKASHIC_LOG_STRIPPED,
|
||||
HexBlocks.AKASHIC_WOOD, HexBlocks.AKASHIC_WOOD_STRIPPED);
|
||||
tag(BlockTags.LEAVES)
|
||||
.add(HexBlocks.AKASHIC_LEAVES1.get(), HexBlocks.AKASHIC_LEAVES2.get(), HexBlocks.AKASHIC_LEAVES3.get());
|
||||
.add(HexBlocks.AKASHIC_LEAVES1, HexBlocks.AKASHIC_LEAVES2, HexBlocks.AKASHIC_LEAVES3);
|
||||
|
||||
tag(BlockTags.PLANKS)
|
||||
.add(HexBlocks.AKASHIC_PLANKS.get(), HexBlocks.AKASHIC_PANEL.get(), HexBlocks.AKASHIC_TILE.get());
|
||||
.add(HexBlocks.AKASHIC_PLANKS, HexBlocks.AKASHIC_PANEL, HexBlocks.AKASHIC_TILE);
|
||||
tag(HexBlockTags.AKASHIC_PLANKS)
|
||||
.add(HexBlocks.AKASHIC_PLANKS.get(), HexBlocks.AKASHIC_PANEL.get(), HexBlocks.AKASHIC_TILE.get());
|
||||
.add(HexBlocks.AKASHIC_PLANKS, HexBlocks.AKASHIC_PANEL, HexBlocks.AKASHIC_TILE);
|
||||
tag(BlockTags.SLABS)
|
||||
.add(HexBlocks.AKASHIC_SLAB.get());
|
||||
.add(HexBlocks.AKASHIC_SLAB);
|
||||
tag(BlockTags.WOODEN_SLABS)
|
||||
.add(HexBlocks.AKASHIC_SLAB.get());
|
||||
.add(HexBlocks.AKASHIC_SLAB);
|
||||
tag(BlockTags.DOORS)
|
||||
.add(HexBlocks.AKASHIC_DOOR.get());
|
||||
.add(HexBlocks.AKASHIC_DOOR);
|
||||
tag(BlockTags.WOODEN_DOORS)
|
||||
.add(HexBlocks.AKASHIC_DOOR.get());
|
||||
.add(HexBlocks.AKASHIC_DOOR);
|
||||
tag(BlockTags.TRAPDOORS)
|
||||
.add(HexBlocks.AKASHIC_TRAPDOOR.get());
|
||||
.add(HexBlocks.AKASHIC_TRAPDOOR);
|
||||
tag(BlockTags.WOODEN_TRAPDOORS)
|
||||
.add(HexBlocks.AKASHIC_TRAPDOOR.get());
|
||||
.add(HexBlocks.AKASHIC_TRAPDOOR);
|
||||
tag(BlockTags.PRESSURE_PLATES)
|
||||
.add(HexBlocks.AKASHIC_PRESSURE_PLATE.get());
|
||||
.add(HexBlocks.AKASHIC_PRESSURE_PLATE);
|
||||
tag(BlockTags.WOODEN_PRESSURE_PLATES)
|
||||
.add(HexBlocks.AKASHIC_PRESSURE_PLATE.get());
|
||||
.add(HexBlocks.AKASHIC_PRESSURE_PLATE);
|
||||
tag(BlockTags.BUTTONS)
|
||||
.add(HexBlocks.AKASHIC_BUTTON.get());
|
||||
.add(HexBlocks.AKASHIC_BUTTON);
|
||||
tag(BlockTags.WOODEN_BUTTONS)
|
||||
.add(HexBlocks.AKASHIC_BUTTON.get());
|
||||
.add(HexBlocks.AKASHIC_BUTTON);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
package at.petrak.hexcasting.forge.datagen;
|
||||
|
||||
import at.petrak.hexcasting.HexMod;
|
||||
import at.petrak.hexcasting.common.lib.HexBlocks;
|
||||
import at.petrak.hexcasting.common.items.*;
|
||||
import at.petrak.hexcasting.api.HexAPI;
|
||||
import at.petrak.hexcasting.common.items.ItemFocus;
|
||||
import at.petrak.hexcasting.common.items.ItemScroll;
|
||||
import at.petrak.hexcasting.common.items.ItemSlate;
|
||||
import at.petrak.hexcasting.common.items.ItemWand;
|
||||
import at.petrak.hexcasting.common.items.magic.ItemManaBattery;
|
||||
import at.petrak.hexcasting.common.items.magic.ItemPackagedHex;
|
||||
import at.petrak.hexcasting.common.lib.HexBlocks;
|
||||
import at.petrak.hexcasting.common.lib.HexItems;
|
||||
import at.petrak.paucal.api.datagen.PaucalItemModelProvider;
|
||||
import at.petrak.paucal.api.forge.datagen.PaucalItemModelProvider;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.DyeColor;
|
||||
|
@ -17,7 +20,7 @@ import net.minecraftforge.common.data.ExistingFileHelper;
|
|||
|
||||
public class HexItemModels extends PaucalItemModelProvider {
|
||||
public HexItemModels(DataGenerator generator, ExistingFileHelper existingFileHelper) {
|
||||
super(generator, HexMod.MOD_ID, existingFileHelper);
|
||||
super(generator, HexAPI.MOD_ID, existingFileHelper);
|
||||
}
|
||||
|
||||
private static final String[] DATUM_TYPES = {"empty", "entity", "double", "vec3", "widget", "list", "pattern"};
|
||||
|
@ -25,14 +28,14 @@ public class HexItemModels extends PaucalItemModelProvider {
|
|||
|
||||
@Override
|
||||
protected void registerModels() {
|
||||
simpleItem(HexItems.AMETHYST_DUST.get());
|
||||
simpleItem(HexItems.CHARGED_AMETHYST.get());
|
||||
simpleItem(HexItems.SUBMARINE_SANDWICH.get());
|
||||
simpleItem(HexItems.ABACUS.get());
|
||||
simpleItem(HexItems.AMETHYST_DUST);
|
||||
simpleItem(HexItems.CHARGED_AMETHYST);
|
||||
simpleItem(HexItems.SUBMARINE_SANDWICH);
|
||||
simpleItem(HexItems.ABACUS);
|
||||
|
||||
simpleItem(modLoc("scroll_pristine"));
|
||||
simpleItem(modLoc("scroll_ancient"));
|
||||
getBuilder(HexItems.SCROLL.get().getRegistryName().getPath())
|
||||
getBuilder(HexItems.SCROLL.getRegistryName().getPath())
|
||||
.override()
|
||||
.predicate(ItemScroll.ANCIENT_PREDICATE, 0f)
|
||||
.model(new ModelFile.UncheckedModelFile(modLoc("item/scroll_pristine"))).end()
|
||||
|
@ -40,8 +43,8 @@ public class HexItemModels extends PaucalItemModelProvider {
|
|||
.predicate(ItemScroll.ANCIENT_PREDICATE, 1f)
|
||||
.model(new ModelFile.UncheckedModelFile(modLoc("item/scroll_ancient"))).end();
|
||||
|
||||
simpleItem(HexItems.SCRYING_LENS.get());
|
||||
getBuilder(HexItems.SCRYING_LENS.get().getRegistryName().getPath())
|
||||
simpleItem(HexItems.SCRYING_LENS);
|
||||
getBuilder(HexItems.SCRYING_LENS.getRegistryName().getPath())
|
||||
.transforms()
|
||||
.transform(ModelBuilder.Perspective.HEAD)
|
||||
.rotation(0f, 0f, 0f)
|
||||
|
@ -53,15 +56,15 @@ public class HexItemModels extends PaucalItemModelProvider {
|
|||
singleTexture("wand_bosnia", new ResourceLocation("item/handheld_rod"),
|
||||
"layer0", modLoc("item/wands/bosnia"));
|
||||
|
||||
buildWand(HexItems.WAND_OAK.get(), "oak");
|
||||
buildWand(HexItems.WAND_BIRCH.get(), "birch");
|
||||
buildWand(HexItems.WAND_SPRUCE.get(), "spruce");
|
||||
buildWand(HexItems.WAND_JUNGLE.get(), "jungle");
|
||||
buildWand(HexItems.WAND_DARK_OAK.get(), "dark_oak");
|
||||
buildWand(HexItems.WAND_ACACIA.get(), "acacia");
|
||||
buildWand(HexItems.WAND_CRIMSON.get(), "crimson");
|
||||
buildWand(HexItems.WAND_WARPED.get(), "warped");
|
||||
buildWand(HexItems.WAND_AKASHIC.get(), "akashic");
|
||||
buildWand(HexItems.WAND_OAK, "oak");
|
||||
buildWand(HexItems.WAND_BIRCH, "birch");
|
||||
buildWand(HexItems.WAND_SPRUCE, "spruce");
|
||||
buildWand(HexItems.WAND_JUNGLE, "jungle");
|
||||
buildWand(HexItems.WAND_DARK_OAK, "dark_oak");
|
||||
buildWand(HexItems.WAND_ACACIA, "acacia");
|
||||
buildWand(HexItems.WAND_CRIMSON, "crimson");
|
||||
buildWand(HexItems.WAND_WARPED, "warped");
|
||||
buildWand(HexItems.WAND_AKASHIC, "akashic");
|
||||
|
||||
simpleItem(modLoc("patchouli_book"));
|
||||
|
||||
|
@ -76,7 +79,7 @@ public class HexItemModels extends PaucalItemModelProvider {
|
|||
var focusName = "focus_" + suffix;
|
||||
singleTexture(focusName, new ResourceLocation("item/generated"),
|
||||
"layer0", modLoc("item/focus/" + suffix));
|
||||
getBuilder(HexItems.FOCUS.get().getRegistryName().getPath())
|
||||
getBuilder(HexItems.FOCUS.getRegistryName().getPath())
|
||||
.override()
|
||||
.predicate(ItemFocus.DATATYPE_PRED, i)
|
||||
.predicate(ItemFocus.SEALED_PRED, sealed ? 1f : 0f)
|
||||
|
@ -86,7 +89,7 @@ public class HexItemModels extends PaucalItemModelProvider {
|
|||
var spellbookName = "spellbook_" + type + (sealed ? "_sealed" : "");
|
||||
singleTexture(spellbookName, new ResourceLocation("item/generated"),
|
||||
"layer0", modLoc("item/spellbook/" + suffix));
|
||||
getBuilder(HexItems.SPELLBOOK.get().getRegistryName().getPath())
|
||||
getBuilder(HexItems.SPELLBOOK.getRegistryName().getPath())
|
||||
.override()
|
||||
.predicate(ItemFocus.DATATYPE_PRED, i)
|
||||
.predicate(ItemFocus.SEALED_PRED, sealed ? 1f : 0f)
|
||||
|
@ -95,9 +98,9 @@ public class HexItemModels extends PaucalItemModelProvider {
|
|||
}
|
||||
}
|
||||
|
||||
buildPackagedSpell(HexItems.CYPHER.get(), "cypher");
|
||||
buildPackagedSpell(HexItems.TRINKET.get(), "trinket");
|
||||
buildPackagedSpell(HexItems.ARTIFACT.get(), "artifact");
|
||||
buildPackagedSpell(HexItems.CYPHER, "cypher");
|
||||
buildPackagedSpell(HexItems.TRINKET, "trinket");
|
||||
buildPackagedSpell(HexItems.ARTIFACT, "artifact");
|
||||
|
||||
int maxFill = 4;
|
||||
for (int size = 0; size < PHIAL_SIZES.length; size++) {
|
||||
|
@ -106,10 +109,10 @@ public class HexItemModels extends PaucalItemModelProvider {
|
|||
singleTexture(
|
||||
name,
|
||||
new ResourceLocation("item/generated"),
|
||||
"layer0", new ResourceLocation(HexMod.MOD_ID, "item/phial/" + name));
|
||||
"layer0", modLoc("item/phial/" + name));
|
||||
|
||||
float fillProp = (float) fill / maxFill;
|
||||
getBuilder(HexItems.BATTERY.getId().getPath()).override()
|
||||
getBuilder(HexItems.BATTERY.getRegistryName().getPath()).override()
|
||||
.predicate(ItemManaBattery.MANA_PREDICATE, fillProp)
|
||||
.predicate(ItemManaBattery.MAX_MANA_PREDICATE, size)
|
||||
.model(new ModelFile.UncheckedModelFile(modLoc("item/" + name)))
|
||||
|
@ -118,20 +121,21 @@ public class HexItemModels extends PaucalItemModelProvider {
|
|||
}
|
||||
|
||||
for (int i = 0; i < DyeColor.values().length; i++) {
|
||||
singleTexture(HexItems.DYE_COLORIZERS.get(DyeColor.values()[i]).getId().getPath(),
|
||||
singleTexture(HexItems.DYE_COLORIZERS.get(DyeColor.values()[i]).getRegistryName().getPath(),
|
||||
new ResourceLocation("item/generated"),
|
||||
"layer0", new ResourceLocation(HexMod.MOD_ID, "item/colorizer/dye" + i));
|
||||
"layer0", modLoc("item/colorizer/dye" + i));
|
||||
}
|
||||
for (int i = 0; i < 14; i++) {
|
||||
singleTexture(HexItems.PRIDE_COLORIZERS[i].getId().getPath(), new ResourceLocation("item/generated"),
|
||||
"layer0", new ResourceLocation(HexMod.MOD_ID, "item/colorizer/pride" + i));
|
||||
singleTexture(HexItems.PRIDE_COLORIZERS[i].getRegistryName().getPath(),
|
||||
new ResourceLocation("item/generated"),
|
||||
"layer0", modLoc("item/colorizer/pride" + i));
|
||||
}
|
||||
singleTexture(HexItems.UUID_COLORIZER.getId().getPath(), new ResourceLocation("item/generated"),
|
||||
"layer0", new ResourceLocation(HexMod.MOD_ID, "item/colorizer/uuid"));
|
||||
singleTexture(HexItems.UUID_COLORIZER.getRegistryName().getPath(), new ResourceLocation("item/generated"),
|
||||
"layer0", modLoc("item/colorizer/uuid"));
|
||||
|
||||
simpleItem(modLoc("slate_blank"));
|
||||
simpleItem(modLoc("slate_written"));
|
||||
getBuilder(HexItems.SLATE.getId().getPath()).override()
|
||||
getBuilder(HexItems.SLATE.getRegistryName().getPath()).override()
|
||||
.predicate(ItemSlate.WRITTEN_PRED, 0)
|
||||
.model(new ModelFile.UncheckedModelFile(modLoc("item/slate_blank")))
|
||||
.end()
|
||||
|
@ -140,23 +144,23 @@ public class HexItemModels extends PaucalItemModelProvider {
|
|||
.model(new ModelFile.UncheckedModelFile(modLoc("item/slate_written")))
|
||||
.end();
|
||||
|
||||
getBuilder(HexBlocks.AKASHIC_RECORD.getId().getPath()).parent(
|
||||
getBuilder(HexBlocks.AKASHIC_RECORD.getRegistryName().getPath()).parent(
|
||||
new ModelFile.UncheckedModelFile(modLoc("block/akashic_record")));
|
||||
simpleItem(modLoc("akashic_door"));
|
||||
getBuilder(HexBlocks.AKASHIC_TRAPDOOR.getId().getPath()).parent(
|
||||
getBuilder(HexBlocks.AKASHIC_TRAPDOOR.getRegistryName().getPath()).parent(
|
||||
new ModelFile.UncheckedModelFile(modLoc("block/akashic_trapdoor_bottom")));
|
||||
getBuilder(HexBlocks.AKASHIC_LOG.getId().getPath()).parent(
|
||||
getBuilder(HexBlocks.AKASHIC_LOG.getRegistryName().getPath()).parent(
|
||||
new ModelFile.UncheckedModelFile(modLoc("block/akashic_log")));
|
||||
getBuilder(HexBlocks.AKASHIC_LOG_STRIPPED.getId().getPath()).parent(
|
||||
getBuilder(HexBlocks.AKASHIC_LOG_STRIPPED.getRegistryName().getPath()).parent(
|
||||
new ModelFile.UncheckedModelFile(modLoc("block/akashic_log_stripped")));
|
||||
getBuilder(HexBlocks.AKASHIC_STAIRS.getId().getPath()).parent(
|
||||
getBuilder(HexBlocks.AKASHIC_STAIRS.getRegistryName().getPath()).parent(
|
||||
new ModelFile.UncheckedModelFile(modLoc("block/akashic_stairs")));
|
||||
getBuilder(HexBlocks.AKASHIC_SLAB.getId().getPath()).parent(
|
||||
getBuilder(HexBlocks.AKASHIC_SLAB.getRegistryName().getPath()).parent(
|
||||
new ModelFile.UncheckedModelFile(modLoc("block/akashic_slab")));
|
||||
getBuilder(HexBlocks.AKASHIC_BUTTON.getId().getPath()).parent(
|
||||
getBuilder(HexBlocks.AKASHIC_BUTTON.getRegistryName().getPath()).parent(
|
||||
new ModelFile.UncheckedModelFile(new ResourceLocation("block/button_inventory")))
|
||||
.texture("texture", modLoc("block/akashic/planks1"));
|
||||
getBuilder(HexBlocks.AKASHIC_PRESSURE_PLATE.getId().getPath())
|
||||
getBuilder(HexBlocks.AKASHIC_PRESSURE_PLATE.getRegistryName().getPath())
|
||||
.parent(new ModelFile.UncheckedModelFile(modLoc("block/akashic_pressure_plate")));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package at.petrak.hexcasting.forge.datagen;
|
||||
|
||||
import at.petrak.hexcasting.HexMod;
|
||||
import at.petrak.hexcasting.api.HexAPI;
|
||||
import at.petrak.hexcasting.api.mod.HexItemTags;
|
||||
import at.petrak.hexcasting.common.lib.HexBlockTags;
|
||||
import at.petrak.hexcasting.common.lib.HexItems;
|
||||
|
@ -17,16 +17,16 @@ import org.jetbrains.annotations.Nullable;
|
|||
public class HexItemTagProvider extends ItemTagsProvider {
|
||||
public HexItemTagProvider(DataGenerator pGenerator, BlockTagsProvider pBlockTagsProvider,
|
||||
@Nullable ExistingFileHelper existingFileHelper) {
|
||||
super(pGenerator, pBlockTagsProvider, HexMod.MOD_ID, existingFileHelper);
|
||||
super(pGenerator, pBlockTagsProvider, HexAPI.MOD_ID, existingFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addTags() {
|
||||
tag(Tags.Items.GEMS).add(HexItems.CHARGED_AMETHYST.get());
|
||||
tag(HexItemTags.AMETHYST_DUST).add(HexItems.AMETHYST_DUST.get());
|
||||
tag(HexItemTags.WANDS).add(HexItems.WAND_OAK.get(), HexItems.WAND_SPRUCE.get(), HexItems.WAND_BIRCH.get(),
|
||||
HexItems.WAND_JUNGLE.get(), HexItems.WAND_ACACIA.get(), HexItems.WAND_DARK_OAK.get(),
|
||||
HexItems.WAND_CRIMSON.get(), HexItems.WAND_WARPED.get(), HexItems.WAND_AKASHIC.get());
|
||||
tag(Tags.Items.GEMS).add(HexItems.CHARGED_AMETHYST);
|
||||
tag(HexItemTags.AMETHYST_DUST).add(HexItems.AMETHYST_DUST);
|
||||
tag(HexItemTags.WANDS).add(HexItems.WAND_OAK, HexItems.WAND_SPRUCE, HexItems.WAND_BIRCH,
|
||||
HexItems.WAND_JUNGLE, HexItems.WAND_ACACIA, HexItems.WAND_DARK_OAK,
|
||||
HexItems.WAND_CRIMSON, HexItems.WAND_WARPED, HexItems.WAND_AKASHIC);
|
||||
tag(HexItemTags.PHIAL_BASE).add(Items.GLASS_BOTTLE);
|
||||
|
||||
this.copy(HexBlockTags.AKASHIC_LOGS, HexItemTags.AKASHIC_LOGS);
|
||||
|
|
|
@ -2,7 +2,7 @@ package at.petrak.hexcasting.forge.datagen;
|
|||
|
||||
import at.petrak.hexcasting.common.blocks.circles.BlockEntitySlate;
|
||||
import at.petrak.hexcasting.common.lib.HexBlocks;
|
||||
import at.petrak.paucal.api.datagen.PaucalLootTableProvider;
|
||||
import at.petrak.paucal.api.forge.datagen.PaucalLootTableProvider;
|
||||
import net.minecraft.advancements.critereon.EnchantmentPredicate;
|
||||
import net.minecraft.advancements.critereon.ItemPredicate;
|
||||
import net.minecraft.advancements.critereon.MinMaxBounds;
|
||||
|
@ -47,22 +47,22 @@ public class HexLootTables extends PaucalLootTableProvider {
|
|||
HexBlocks.AKASHIC_PLANKS, HexBlocks.AKASHIC_TILE, HexBlocks.AKASHIC_PANEL,
|
||||
HexBlocks.AKASHIC_TRAPDOOR);
|
||||
|
||||
makeLeafTable(lootTables, HexBlocks.AKASHIC_LEAVES1.get());
|
||||
makeLeafTable(lootTables, HexBlocks.AKASHIC_LEAVES2.get());
|
||||
makeLeafTable(lootTables, HexBlocks.AKASHIC_LEAVES3.get());
|
||||
makeLeafTable(lootTables, HexBlocks.AKASHIC_LEAVES1);
|
||||
makeLeafTable(lootTables, HexBlocks.AKASHIC_LEAVES2);
|
||||
makeLeafTable(lootTables, HexBlocks.AKASHIC_LEAVES3);
|
||||
|
||||
var slatePool = LootPool.lootPool().name("slate").
|
||||
setRolls(ConstantValue.exactly(1))
|
||||
.add(LootItem.lootTableItem(HexBlocks.SLATE.get())
|
||||
.add(LootItem.lootTableItem(HexBlocks.SLATE)
|
||||
.apply(CopyNbtFunction.copyData(ContextNbtProvider.BLOCK_ENTITY)
|
||||
.copy(BlockEntitySlate.TAG_PATTERN, "BlockEntityTag." + BlockEntitySlate.TAG_PATTERN)));
|
||||
lootTables.put(HexBlocks.SLATE.get(), LootTable.lootTable().withPool(slatePool));
|
||||
lootTables.put(HexBlocks.SLATE, LootTable.lootTable().withPool(slatePool));
|
||||
|
||||
var doorPool = dropThisPool(HexBlocks.AKASHIC_DOOR.get(), 1)
|
||||
.when(new LootItemBlockStatePropertyCondition.Builder(HexBlocks.AKASHIC_DOOR.get()).setProperties(
|
||||
var doorPool = dropThisPool(HexBlocks.AKASHIC_DOOR, 1)
|
||||
.when(new LootItemBlockStatePropertyCondition.Builder(HexBlocks.AKASHIC_DOOR).setProperties(
|
||||
StatePropertiesPredicate.Builder.properties().hasProperty(DoorBlock.HALF, DoubleBlockHalf.LOWER)
|
||||
));
|
||||
lootTables.put(HexBlocks.AKASHIC_DOOR.get(), LootTable.lootTable().withPool(doorPool));
|
||||
lootTables.put(HexBlocks.AKASHIC_DOOR, LootTable.lootTable().withPool(doorPool));
|
||||
}
|
||||
|
||||
private void makeLeafTable(Map<Block, LootTable.Builder> lootTables, Block block) {
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
package at.petrak.hexcasting.forge.datagen;
|
||||
|
||||
import at.petrak.hexcasting.HexMod;
|
||||
import at.petrak.hexcasting.api.HexAPI;
|
||||
import at.petrak.hexcasting.api.advancements.OvercastTrigger;
|
||||
import at.petrak.hexcasting.api.mod.HexItemTags;
|
||||
import at.petrak.hexcasting.common.items.ItemWand;
|
||||
import at.petrak.hexcasting.common.lib.HexBlocks;
|
||||
import at.petrak.hexcasting.common.lib.HexItems;
|
||||
import at.petrak.hexcasting.common.items.ItemWand;
|
||||
import at.petrak.hexcasting.common.recipe.SealFocusRecipe;
|
||||
import at.petrak.hexcasting.common.recipe.SealSpellbookRecipe;
|
||||
import at.petrak.hexcasting.common.recipe.ingredient.StateIngredientHelper;
|
||||
import at.petrak.hexcasting.common.recipe.ingredient.VillagerIngredient;
|
||||
import at.petrak.hexcasting.forge.datagen.recipebuilders.BrainsweepRecipeBuilder;
|
||||
import at.petrak.paucal.api.datagen.PaucalRecipeProvider;
|
||||
import at.petrak.paucal.api.forge.datagen.PaucalRecipeProvider;
|
||||
import net.minecraft.advancements.critereon.EntityPredicate;
|
||||
import net.minecraft.advancements.critereon.InventoryChangeTrigger;
|
||||
import net.minecraft.advancements.critereon.ItemPredicate;
|
||||
|
@ -33,11 +33,10 @@ import net.minecraftforge.registries.ForgeRegistries;
|
|||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import static at.petrak.hexcasting.common.lib.RegisterHelper.prefix;
|
||||
|
||||
public class HexRecipes extends PaucalRecipeProvider {
|
||||
public HexRecipes(DataGenerator pGenerator) {
|
||||
super(pGenerator, HexMod.MOD_ID);
|
||||
super(pGenerator, HexAPI.MOD_ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -45,46 +44,46 @@ public class HexRecipes extends PaucalRecipeProvider {
|
|||
specialRecipe(recipes, SealFocusRecipe.SERIALIZER);
|
||||
specialRecipe(recipes, SealSpellbookRecipe.SERIALIZER);
|
||||
|
||||
wandRecipe(recipes, HexItems.WAND_OAK.get(), Items.OAK_PLANKS);
|
||||
wandRecipe(recipes, HexItems.WAND_BIRCH.get(), Items.BIRCH_PLANKS);
|
||||
wandRecipe(recipes, HexItems.WAND_SPRUCE.get(), Items.SPRUCE_PLANKS);
|
||||
wandRecipe(recipes, HexItems.WAND_JUNGLE.get(), Items.JUNGLE_PLANKS);
|
||||
wandRecipe(recipes, HexItems.WAND_DARK_OAK.get(), Items.DARK_OAK_PLANKS);
|
||||
wandRecipe(recipes, HexItems.WAND_ACACIA.get(), Items.ACACIA_PLANKS);
|
||||
wandRecipe(recipes, HexItems.WAND_CRIMSON.get(), Items.CRIMSON_PLANKS);
|
||||
wandRecipe(recipes, HexItems.WAND_WARPED.get(), Items.WARPED_PLANKS);
|
||||
wandRecipe(recipes, HexItems.WAND_AKASHIC.get(), HexBlocks.AKASHIC_PLANKS.get().asItem());
|
||||
wandRecipe(recipes, HexItems.WAND_OAK, Items.OAK_PLANKS);
|
||||
wandRecipe(recipes, HexItems.WAND_BIRCH, Items.BIRCH_PLANKS);
|
||||
wandRecipe(recipes, HexItems.WAND_SPRUCE, Items.SPRUCE_PLANKS);
|
||||
wandRecipe(recipes, HexItems.WAND_JUNGLE, Items.JUNGLE_PLANKS);
|
||||
wandRecipe(recipes, HexItems.WAND_DARK_OAK, Items.DARK_OAK_PLANKS);
|
||||
wandRecipe(recipes, HexItems.WAND_ACACIA, Items.ACACIA_PLANKS);
|
||||
wandRecipe(recipes, HexItems.WAND_CRIMSON, Items.CRIMSON_PLANKS);
|
||||
wandRecipe(recipes, HexItems.WAND_WARPED, Items.WARPED_PLANKS);
|
||||
wandRecipe(recipes, HexItems.WAND_AKASHIC, HexBlocks.AKASHIC_PLANKS.asItem());
|
||||
|
||||
ringCornered(HexItems.FOCUS.get(), 1, Ingredient.of(Tags.Items.DUSTS_GLOWSTONE),
|
||||
Ingredient.of(Tags.Items.LEATHER), Ingredient.of(HexItems.CHARGED_AMETHYST.get()))
|
||||
ringCornered(HexItems.FOCUS, 1, Ingredient.of(Tags.Items.DUSTS_GLOWSTONE),
|
||||
Ingredient.of(Tags.Items.LEATHER), Ingredient.of(HexItems.CHARGED_AMETHYST))
|
||||
.unlockedBy("has_item", has(HexItemTags.WANDS))
|
||||
.save(recipes);
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexItems.SPELLBOOK.get())
|
||||
ShapedRecipeBuilder.shaped(HexItems.SPELLBOOK)
|
||||
.define('N', Tags.Items.NUGGETS_GOLD)
|
||||
.define('B', Items.WRITABLE_BOOK)
|
||||
.define('A', HexItems.CHARGED_AMETHYST.get())
|
||||
.define('A', HexItems.CHARGED_AMETHYST)
|
||||
.define('F', Items.CHORUS_FRUIT) // i wanna gate this behind the end SOMEHOW
|
||||
// hey look its my gender ^^
|
||||
.pattern("NBA")
|
||||
.pattern("NFA")
|
||||
.pattern("NBA")
|
||||
.unlockedBy("has_focus", has(HexItems.FOCUS.get()))
|
||||
.unlockedBy("has_focus", has(HexItems.FOCUS))
|
||||
.unlockedBy("has_chorus", has(Items.CHORUS_FRUIT)).save(recipes);
|
||||
|
||||
ringCornerless(HexItems.CYPHER.get(), 1,
|
||||
ringCornerless(HexItems.CYPHER, 1,
|
||||
Ingredient.of(Tags.Items.INGOTS_COPPER),
|
||||
Ingredient.of(HexItems.AMETHYST_DUST.get()))
|
||||
Ingredient.of(HexItems.AMETHYST_DUST))
|
||||
.unlockedBy("has_item", has(HexItemTags.WANDS)).save(recipes);
|
||||
|
||||
ringCornerless(HexItems.TRINKET.get(), 1,
|
||||
ringCornerless(HexItems.TRINKET, 1,
|
||||
Ingredient.of(Tags.Items.INGOTS_IRON),
|
||||
Ingredient.of(Items.AMETHYST_SHARD))
|
||||
.unlockedBy("has_item", has(HexItemTags.WANDS)).save(recipes);
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexItems.ARTIFACT.get())
|
||||
ShapedRecipeBuilder.shaped(HexItems.ARTIFACT)
|
||||
.define('F', Tags.Items.INGOTS_GOLD)
|
||||
.define('A', HexItems.CHARGED_AMETHYST.get())
|
||||
.define('A', HexItems.CHARGED_AMETHYST)
|
||||
// why in god's name does minecraft have two different places for item tags
|
||||
.define('D', ItemTags.MUSIC_DISCS)
|
||||
.pattern(" F ")
|
||||
|
@ -92,10 +91,10 @@ public class HexRecipes extends PaucalRecipeProvider {
|
|||
.pattern(" D ")
|
||||
.unlockedBy("has_item", has(HexItemTags.WANDS)).save(recipes);
|
||||
|
||||
ringCornerless(HexItems.SCRYING_LENS.get(), 1, Items.GLASS, HexItems.AMETHYST_DUST.get())
|
||||
ringCornerless(HexItems.SCRYING_LENS, 1, Items.GLASS, HexItems.AMETHYST_DUST)
|
||||
.unlockedBy("has_item", has(HexItemTags.WANDS)).save(recipes);
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexItems.ABACUS.get())
|
||||
ShapedRecipeBuilder.shaped(HexItems.ABACUS)
|
||||
.define('S', Items.STICK)
|
||||
.define('A', Items.AMETHYST_SHARD)
|
||||
.define('W', ItemTags.PLANKS)
|
||||
|
@ -105,7 +104,7 @@ public class HexRecipes extends PaucalRecipeProvider {
|
|||
.unlockedBy("has_item", has(HexItemTags.WANDS)).save(recipes);
|
||||
|
||||
// Why am I like this
|
||||
ShapedRecipeBuilder.shaped(HexItems.SUBMARINE_SANDWICH.get())
|
||||
ShapedRecipeBuilder.shaped(HexItems.SUBMARINE_SANDWICH)
|
||||
.define('S', Items.STICK)
|
||||
.define('A', Items.AMETHYST_SHARD)
|
||||
.define('C', Items.COOKED_BEEF)
|
||||
|
@ -116,42 +115,42 @@ public class HexRecipes extends PaucalRecipeProvider {
|
|||
.unlockedBy("has_item", has(Items.AMETHYST_SHARD)).save(recipes);
|
||||
|
||||
for (var dye : DyeColor.values()) {
|
||||
var item = HexItems.DYE_COLORIZERS.get(dye).get();
|
||||
var item = HexItems.DYE_COLORIZERS.get(dye);
|
||||
ShapedRecipeBuilder.shaped(item)
|
||||
.define('B', Items.BOWL)
|
||||
.define('D', HexItems.AMETHYST_DUST.get())
|
||||
.define('D', HexItems.AMETHYST_DUST)
|
||||
.define('C', DyeItem.byColor(dye))
|
||||
.pattern(" C ")
|
||||
.pattern(" D ")
|
||||
.pattern(" B ")
|
||||
.unlockedBy("has_item", has(HexItems.AMETHYST_DUST.get())).save(recipes);
|
||||
.unlockedBy("has_item", has(HexItems.AMETHYST_DUST)).save(recipes);
|
||||
}
|
||||
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[0].get(), Items.EGG); // Trans
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[1].get(), Items.STONE_BRICK_WALL); // Gay
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[2].get(), Items.GLASS); // Agender
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[3].get(), Items.BREAD); // Asexual
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[4].get(), Items.WHEAT); // Bisexual
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[5].get(), Items.CARROT); // Pansexual
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[6].get(), Items.GLASS_BOTTLE); // Genderqueer
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[7].get(), Items.RAW_COPPER); // Demigirl
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[8].get(), Items.MOSS_BLOCK); // Non-Binary
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[9].get(), Items.HONEYCOMB); // Lesbian
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[10].get(), Items.RAW_IRON); // Demiboy
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[11].get(), Items.WATER_BUCKET); // Genderfluid
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[12].get(), Items.AZALEA); // Intersex
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[13].get(), Items.ARROW); // Aroace
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[0], Items.EGG); // Trans
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[1], Items.STONE_BRICK_WALL); // Gay
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[2], Items.GLASS); // Agender
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[3], Items.BREAD); // Asexual
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[4], Items.WHEAT); // Bisexual
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[5], Items.CARROT); // Pansexual
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[6], Items.GLASS_BOTTLE); // Genderqueer
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[7], Items.RAW_COPPER); // Demigirl
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[8], Items.MOSS_BLOCK); // Non-Binary
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[9], Items.HONEYCOMB); // Lesbian
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[10], Items.RAW_IRON); // Demiboy
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[11], Items.WATER_BUCKET); // Genderfluid
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[12], Items.AZALEA); // Intersex
|
||||
gayRecipe(recipes, HexItems.PRIDE_COLORIZERS[13], Items.ARROW); // Aroace
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexItems.UUID_COLORIZER.get())
|
||||
ShapedRecipeBuilder.shaped(HexItems.UUID_COLORIZER)
|
||||
.define('B', Items.BOWL)
|
||||
.define('D', HexItems.AMETHYST_DUST.get())
|
||||
.define('D', HexItems.AMETHYST_DUST)
|
||||
.define('C', Items.AMETHYST_SHARD)
|
||||
.pattern(" C ")
|
||||
.pattern(" D ")
|
||||
.pattern(" B ")
|
||||
.unlockedBy("has_item", has(HexItems.AMETHYST_DUST.get())).save(recipes);
|
||||
.unlockedBy("has_item", has(HexItems.AMETHYST_DUST)).save(recipes);
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexItems.SCROLL.get())
|
||||
ShapedRecipeBuilder.shaped(HexItems.SCROLL)
|
||||
.define('P', Items.PAPER)
|
||||
.define('A', Items.AMETHYST_SHARD)
|
||||
.pattern(" A")
|
||||
|
@ -159,99 +158,99 @@ public class HexRecipes extends PaucalRecipeProvider {
|
|||
.pattern("PP ")
|
||||
.unlockedBy("has_item", has(Items.AMETHYST_SHARD)).save(recipes);
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexItems.SLATE.get(), 6)
|
||||
ShapedRecipeBuilder.shaped(HexItems.SLATE, 6)
|
||||
.define('S', Items.DEEPSLATE)
|
||||
.define('A', HexItems.AMETHYST_DUST.get())
|
||||
.define('A', HexItems.AMETHYST_DUST)
|
||||
.pattern(" A ")
|
||||
.pattern("SSS")
|
||||
.unlockedBy("has_item", has(HexItems.AMETHYST_DUST.get())).save(recipes);
|
||||
.unlockedBy("has_item", has(HexItems.AMETHYST_DUST)).save(recipes);
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.SLATE_BLOCK.get())
|
||||
.define('S', HexItems.SLATE.get())
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.SLATE_BLOCK)
|
||||
.define('S', HexItems.SLATE)
|
||||
.pattern("S")
|
||||
.pattern("S")
|
||||
.unlockedBy("has_item", has(HexItems.SLATE.get()))
|
||||
.unlockedBy("has_item", has(HexItems.SLATE))
|
||||
.save(recipes, modLoc("slate_block_from_slates"));
|
||||
|
||||
ringAll(HexBlocks.SLATE_BLOCK.get(), 8, Blocks.DEEPSLATE, HexItems.AMETHYST_DUST.get())
|
||||
.unlockedBy("has_item", has(HexItems.SLATE.get())).save(recipes);
|
||||
ringAll(HexBlocks.SLATE_BLOCK, 8, Blocks.DEEPSLATE, HexItems.AMETHYST_DUST)
|
||||
.unlockedBy("has_item", has(HexItems.SLATE)).save(recipes);
|
||||
|
||||
packing(HexItems.AMETHYST_DUST.get(), HexBlocks.AMETHYST_DUST_BLOCK.get().asItem(), "amethyst_dust",
|
||||
packing(HexItems.AMETHYST_DUST, HexBlocks.AMETHYST_DUST_BLOCK.asItem(), "amethyst_dust",
|
||||
false, recipes);
|
||||
|
||||
ringAll(HexBlocks.AMETHYST_TILES.get(), 8, Blocks.AMETHYST_BLOCK, HexItems.AMETHYST_DUST.get())
|
||||
.unlockedBy("has_item", has(HexItems.AMETHYST_DUST.get())).save(recipes);
|
||||
SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.AMETHYST_BLOCK), HexBlocks.AMETHYST_TILES.get())
|
||||
ringAll(HexBlocks.AMETHYST_TILES, 8, Blocks.AMETHYST_BLOCK, HexItems.AMETHYST_DUST)
|
||||
.unlockedBy("has_item", has(HexItems.AMETHYST_DUST)).save(recipes);
|
||||
SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.AMETHYST_BLOCK), HexBlocks.AMETHYST_TILES)
|
||||
.unlockedBy("has_item", has(Blocks.AMETHYST_BLOCK))
|
||||
.save(recipes, modLoc("stonecutting/amethyst_tiles"));
|
||||
|
||||
ringAll(HexBlocks.SCROLL_PAPER.get(), 8, Items.PAPER, Items.AMETHYST_SHARD)
|
||||
ringAll(HexBlocks.SCROLL_PAPER, 8, Items.PAPER, Items.AMETHYST_SHARD)
|
||||
.unlockedBy("has_item", has(Items.AMETHYST_SHARD)).save(recipes);
|
||||
ShapelessRecipeBuilder.shapeless(HexBlocks.ANCIENT_SCROLL_PAPER.get(), 8)
|
||||
ShapelessRecipeBuilder.shapeless(HexBlocks.ANCIENT_SCROLL_PAPER, 8)
|
||||
.requires(Tags.Items.DYES_BROWN)
|
||||
.requires(HexBlocks.SCROLL_PAPER.get(), 8)
|
||||
.unlockedBy("has_item", has(HexBlocks.SCROLL_PAPER.get())).save(recipes);
|
||||
stack(HexBlocks.SCROLL_PAPER_LANTERN.get(), 1, HexBlocks.SCROLL_PAPER.get(), Items.TORCH)
|
||||
.unlockedBy("has_item", has(HexBlocks.SCROLL_PAPER.get())).save(recipes);
|
||||
stack(HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN.get(), 1, HexBlocks.ANCIENT_SCROLL_PAPER.get(), Items.TORCH)
|
||||
.unlockedBy("has_item", has(HexBlocks.ANCIENT_SCROLL_PAPER.get())).save(recipes);
|
||||
ShapelessRecipeBuilder.shapeless(HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN.get(), 8)
|
||||
.requires(HexBlocks.SCROLL_PAPER, 8)
|
||||
.unlockedBy("has_item", has(HexBlocks.SCROLL_PAPER)).save(recipes);
|
||||
stack(HexBlocks.SCROLL_PAPER_LANTERN, 1, HexBlocks.SCROLL_PAPER, Items.TORCH)
|
||||
.unlockedBy("has_item", has(HexBlocks.SCROLL_PAPER)).save(recipes);
|
||||
stack(HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN, 1, HexBlocks.ANCIENT_SCROLL_PAPER, Items.TORCH)
|
||||
.unlockedBy("has_item", has(HexBlocks.ANCIENT_SCROLL_PAPER)).save(recipes);
|
||||
ShapelessRecipeBuilder.shapeless(HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN, 8)
|
||||
.requires(Tags.Items.DYES_BROWN)
|
||||
.requires(HexBlocks.SCROLL_PAPER_LANTERN.get(), 8)
|
||||
.unlockedBy("has_item", has(HexBlocks.SCROLL_PAPER_LANTERN.get()))
|
||||
.requires(HexBlocks.SCROLL_PAPER_LANTERN, 8)
|
||||
.unlockedBy("has_item", has(HexBlocks.SCROLL_PAPER_LANTERN))
|
||||
.save(recipes, modLoc("ageing_scroll_paper_lantern"));
|
||||
|
||||
stack(HexBlocks.SCONCE.get(), 4, Ingredient.of(HexItems.CHARGED_AMETHYST.get()),
|
||||
stack(HexBlocks.SCONCE, 4, Ingredient.of(HexItems.CHARGED_AMETHYST),
|
||||
Ingredient.of(Tags.Items.INGOTS_COPPER))
|
||||
.unlockedBy("has_item", has(HexItems.CHARGED_AMETHYST.get())).save(recipes);
|
||||
.unlockedBy("has_item", has(HexItems.CHARGED_AMETHYST)).save(recipes);
|
||||
|
||||
ShapelessRecipeBuilder.shapeless(HexBlocks.AKASHIC_PLANKS.get(), 4)
|
||||
ShapelessRecipeBuilder.shapeless(HexBlocks.AKASHIC_PLANKS, 4)
|
||||
.requires(HexItemTags.AKASHIC_LOGS)
|
||||
.unlockedBy("has_item", has(HexItemTags.AKASHIC_LOGS)).save(recipes);
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_WOOD.get(), 3)
|
||||
.define('W', HexBlocks.AKASHIC_LOG.get())
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_WOOD, 3)
|
||||
.define('W', HexBlocks.AKASHIC_LOG)
|
||||
.pattern("WW")
|
||||
.pattern("WW")
|
||||
.unlockedBy("has_item", has(HexBlocks.AKASHIC_LOG.get())).save(recipes);
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_WOOD_STRIPPED.get(), 3)
|
||||
.define('W', HexBlocks.AKASHIC_LOG_STRIPPED.get())
|
||||
.unlockedBy("has_item", has(HexBlocks.AKASHIC_LOG)).save(recipes);
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_WOOD_STRIPPED, 3)
|
||||
.define('W', HexBlocks.AKASHIC_LOG_STRIPPED)
|
||||
.pattern("WW")
|
||||
.pattern("WW")
|
||||
.unlockedBy("has_item", has(HexBlocks.AKASHIC_LOG_STRIPPED.get())).save(recipes);
|
||||
ring(HexBlocks.AKASHIC_PANEL.get(), 8, HexItemTags.AKASHIC_PLANKS, null)
|
||||
.unlockedBy("has_item", has(HexBlocks.AKASHIC_LOG_STRIPPED)).save(recipes);
|
||||
ring(HexBlocks.AKASHIC_PANEL, 8, HexItemTags.AKASHIC_PLANKS, null)
|
||||
.unlockedBy("has_item", has(HexItemTags.AKASHIC_PLANKS)).save(recipes);
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_TILE.get(), 6)
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_TILE, 6)
|
||||
.define('W', HexItemTags.AKASHIC_PLANKS)
|
||||
.pattern("WW ")
|
||||
.pattern("W W")
|
||||
.pattern(" WW")
|
||||
.unlockedBy("has_item", has(HexItemTags.AKASHIC_PLANKS)).save(recipes);
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_DOOR.get(), 3)
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_DOOR, 3)
|
||||
.define('W', HexItemTags.AKASHIC_PLANKS)
|
||||
.pattern("WW")
|
||||
.pattern("WW")
|
||||
.pattern("WW")
|
||||
.unlockedBy("has_item", has(HexItemTags.AKASHIC_PLANKS)).save(recipes);
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_TRAPDOOR.get(), 2)
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_TRAPDOOR, 2)
|
||||
.define('W', HexItemTags.AKASHIC_PLANKS)
|
||||
.pattern("WWW")
|
||||
.pattern("WWW")
|
||||
.unlockedBy("has_item", has(HexItemTags.AKASHIC_PLANKS)).save(recipes);
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_STAIRS.get(), 4)
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_STAIRS, 4)
|
||||
.define('W', HexItemTags.AKASHIC_PLANKS)
|
||||
.pattern("W ")
|
||||
.pattern("WW ")
|
||||
.pattern("WWW")
|
||||
.unlockedBy("has_item", has(HexItemTags.AKASHIC_PLANKS)).save(recipes);
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_SLAB.get(), 6)
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_SLAB, 6)
|
||||
.define('W', HexItemTags.AKASHIC_PLANKS)
|
||||
.pattern("WWW")
|
||||
.unlockedBy("has_item", has(HexItemTags.AKASHIC_PLANKS)).save(recipes);
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_PRESSURE_PLATE.get(), 1)
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_PRESSURE_PLATE, 1)
|
||||
.define('W', HexItemTags.AKASHIC_PLANKS)
|
||||
.pattern("WW")
|
||||
.unlockedBy("has_item", has(HexItemTags.AKASHIC_PLANKS)).save(recipes);
|
||||
ShapelessRecipeBuilder.shapeless(HexBlocks.AKASHIC_BUTTON.get())
|
||||
ShapelessRecipeBuilder.shapeless(HexBlocks.AKASHIC_BUTTON)
|
||||
.requires(HexItemTags.AKASHIC_PLANKS)
|
||||
.unlockedBy("has_item", has(HexItemTags.AKASHIC_PLANKS)).save(recipes);
|
||||
|
||||
|
@ -261,27 +260,27 @@ public class HexRecipes extends PaucalRecipeProvider {
|
|||
MinMaxBounds.Doubles.atLeast(17.95),
|
||||
MinMaxBounds.Doubles.between(0.1, 2.05));
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.EMPTY_IMPETUS.get())
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.EMPTY_IMPETUS)
|
||||
.define('B', Items.IRON_BARS)
|
||||
.define('A', HexItems.CHARGED_AMETHYST.get())
|
||||
.define('S', HexBlocks.SLATE_BLOCK.get())
|
||||
.define('A', HexItems.CHARGED_AMETHYST)
|
||||
.define('S', HexBlocks.SLATE_BLOCK)
|
||||
.define('P', Items.PURPUR_BLOCK)
|
||||
.pattern("PSS")
|
||||
.pattern("BAB")
|
||||
.pattern("SSP")
|
||||
.unlockedBy("enlightenment", enlightenment).save(recipes);
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.EMPTY_DIRECTRIX.get())
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.EMPTY_DIRECTRIX)
|
||||
.define('C', Items.COMPARATOR)
|
||||
.define('O', Items.OBSERVER)
|
||||
.define('A', HexItems.CHARGED_AMETHYST.get())
|
||||
.define('S', HexBlocks.SLATE_BLOCK.get())
|
||||
.define('A', HexItems.CHARGED_AMETHYST)
|
||||
.define('S', HexBlocks.SLATE_BLOCK)
|
||||
.pattern("CSS")
|
||||
.pattern("OAO")
|
||||
.pattern("SSC")
|
||||
.unlockedBy("enlightenment", enlightenment).save(recipes);
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_BOOKSHELF.get())
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_BOOKSHELF)
|
||||
.define('L', HexItemTags.AKASHIC_LOGS)
|
||||
.define('P', HexItemTags.AKASHIC_PLANKS)
|
||||
.define('C', Items.BOOK)
|
||||
|
@ -289,10 +288,10 @@ public class HexRecipes extends PaucalRecipeProvider {
|
|||
.pattern("CCC")
|
||||
.pattern("LPL")
|
||||
.unlockedBy("enlightenment", enlightenment).save(recipes);
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_CONNECTOR.get())
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AKASHIC_CONNECTOR)
|
||||
.define('L', HexItemTags.AKASHIC_LOGS)
|
||||
.define('P', HexItemTags.AKASHIC_PLANKS)
|
||||
.define('C', HexItems.CHARGED_AMETHYST.get())
|
||||
.define('C', HexItems.CHARGED_AMETHYST)
|
||||
.pattern("LPL")
|
||||
.pattern("CCC")
|
||||
.pattern("LPL")
|
||||
|
@ -304,31 +303,31 @@ public class HexRecipes extends PaucalRecipeProvider {
|
|||
.unlockedBy("enlightenment", enlightenment)
|
||||
.save(recipes, modLoc("brainsweep/budding_amethyst"));
|
||||
|
||||
new BrainsweepRecipeBuilder(StateIngredientHelper.of(HexBlocks.EMPTY_IMPETUS.get()),
|
||||
new BrainsweepRecipeBuilder(StateIngredientHelper.of(HexBlocks.EMPTY_IMPETUS),
|
||||
new VillagerIngredient(new ResourceLocation("toolsmith"), null, 2),
|
||||
HexBlocks.IMPETUS_RIGHTCLICK.get().defaultBlockState())
|
||||
HexBlocks.IMPETUS_RIGHTCLICK.defaultBlockState())
|
||||
.unlockedBy("enlightenment", enlightenment)
|
||||
.save(recipes, modLoc("brainsweep/impetus_rightclick"));
|
||||
new BrainsweepRecipeBuilder(StateIngredientHelper.of(HexBlocks.EMPTY_IMPETUS.get()),
|
||||
new BrainsweepRecipeBuilder(StateIngredientHelper.of(HexBlocks.EMPTY_IMPETUS),
|
||||
new VillagerIngredient(new ResourceLocation("fletcher"), null, 2),
|
||||
HexBlocks.IMPETUS_LOOK.get().defaultBlockState())
|
||||
HexBlocks.IMPETUS_LOOK.defaultBlockState())
|
||||
.unlockedBy("enlightenment", enlightenment)
|
||||
.save(recipes, modLoc("brainsweep/impetus_look"));
|
||||
new BrainsweepRecipeBuilder(StateIngredientHelper.of(HexBlocks.EMPTY_IMPETUS.get()),
|
||||
new BrainsweepRecipeBuilder(StateIngredientHelper.of(HexBlocks.EMPTY_IMPETUS),
|
||||
new VillagerIngredient(new ResourceLocation("cleric"), null, 2),
|
||||
HexBlocks.IMPETUS_STOREDPLAYER.get().defaultBlockState())
|
||||
HexBlocks.IMPETUS_STOREDPLAYER.defaultBlockState())
|
||||
.unlockedBy("enlightenment", enlightenment)
|
||||
.save(recipes, modLoc("brainsweep/impetus_storedplayer"));
|
||||
|
||||
new BrainsweepRecipeBuilder(StateIngredientHelper.of(HexBlocks.EMPTY_DIRECTRIX.get()),
|
||||
new BrainsweepRecipeBuilder(StateIngredientHelper.of(HexBlocks.EMPTY_DIRECTRIX),
|
||||
new VillagerIngredient(new ResourceLocation("mason"), null, 1),
|
||||
HexBlocks.DIRECTRIX_REDSTONE.get().defaultBlockState())
|
||||
HexBlocks.DIRECTRIX_REDSTONE.defaultBlockState())
|
||||
.unlockedBy("enlightenment", enlightenment)
|
||||
.save(recipes, modLoc("brainsweep/directrix_redstone"));
|
||||
|
||||
new BrainsweepRecipeBuilder(StateIngredientHelper.of(HexBlocks.AKASHIC_CONNECTOR.get()),
|
||||
new BrainsweepRecipeBuilder(StateIngredientHelper.of(HexBlocks.AKASHIC_CONNECTOR),
|
||||
new VillagerIngredient(new ResourceLocation("librarian"), null, 5),
|
||||
HexBlocks.AKASHIC_RECORD.get().defaultBlockState())
|
||||
HexBlocks.AKASHIC_RECORD.defaultBlockState())
|
||||
.unlockedBy("enlightenment", enlightenment)
|
||||
.save(recipes, modLoc("brainsweep/akashic_record"));
|
||||
}
|
||||
|
@ -337,28 +336,28 @@ public class HexRecipes extends PaucalRecipeProvider {
|
|||
ShapedRecipeBuilder.shaped(wand)
|
||||
.define('W', plank)
|
||||
.define('S', Items.STICK)
|
||||
.define('A', HexItems.CHARGED_AMETHYST.get())
|
||||
.define('A', HexItems.CHARGED_AMETHYST)
|
||||
.pattern(" SA")
|
||||
.pattern(" WS")
|
||||
.pattern("S ")
|
||||
.unlockedBy("has_item", has(HexItems.CHARGED_AMETHYST.get()))
|
||||
.unlockedBy("has_item", has(HexItems.CHARGED_AMETHYST))
|
||||
.save(recipes);
|
||||
}
|
||||
|
||||
private void gayRecipe(Consumer<FinishedRecipe> recipes, Item colorizer, Item material) {
|
||||
ShapedRecipeBuilder.shaped(colorizer)
|
||||
.define('B', Items.BOWL)
|
||||
.define('D', HexItems.AMETHYST_DUST.get())
|
||||
.define('D', HexItems.AMETHYST_DUST)
|
||||
.define('C', material)
|
||||
.pattern(" C ")
|
||||
.pattern(" D ")
|
||||
.pattern(" B ")
|
||||
.unlockedBy("has_item", has(HexItems.AMETHYST_DUST.get())).save(recipes);
|
||||
.unlockedBy("has_item", has(HexItems.AMETHYST_DUST)).save(recipes);
|
||||
}
|
||||
|
||||
protected void specialRecipe(Consumer<FinishedRecipe> consumer, SimpleRecipeSerializer<?> serializer) {
|
||||
var name = ForgeRegistries.RECIPE_SERIALIZERS.getKey(serializer);
|
||||
SpecialRecipeBuilder.special(serializer).save(consumer, prefix("dynamic/" + name.getPath()).toString());
|
||||
SpecialRecipeBuilder.special(serializer).save(consumer, HexAPI.MOD_ID + ":dynamic/" + name.getPath());
|
||||
}
|
||||
|
||||
// why is this private waa
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package at.petrak.hexcasting.forge.datagen.lootmods;
|
||||
|
||||
import at.petrak.hexcasting.HexMod;
|
||||
import at.petrak.hexcasting.api.HexAPI;
|
||||
import at.petrak.hexcasting.common.lib.HexItems;
|
||||
import at.petrak.paucal.api.lootmod.PaucalAddItemModifier;
|
||||
import at.petrak.paucal.api.lootmod.PaucalLootMods;
|
||||
import at.petrak.paucal.api.forge.datagen.lootmod.PaucalAddItemModifier;
|
||||
import at.petrak.paucal.api.forge.datagen.lootmod.PaucalLootMods;
|
||||
import net.minecraft.advancements.critereon.EnchantmentPredicate;
|
||||
import net.minecraft.advancements.critereon.ItemPredicate;
|
||||
import net.minecraft.advancements.critereon.MinMaxBounds;
|
||||
|
@ -26,14 +26,14 @@ import net.minecraftforge.registries.RegistryObject;
|
|||
|
||||
public class HexLootModifiers extends GlobalLootModifierProvider {
|
||||
public static final DeferredRegister<GlobalLootModifierSerializer<?>> LOOT_MODS = DeferredRegister.create(
|
||||
ForgeRegistries.Keys.LOOT_MODIFIER_SERIALIZERS, HexMod.MOD_ID);
|
||||
ForgeRegistries.Keys.LOOT_MODIFIER_SERIALIZERS, HexAPI.MOD_ID);
|
||||
private static final RegistryObject<PatternScrollModifier.Serializer> SCROLLS_IN_CHESTS = LOOT_MODS.register(
|
||||
"scrolls", PatternScrollModifier.Serializer::new);
|
||||
private static final RegistryObject<AmethystShardReducerModifier.Serializer> AMETHYST_SHARD_REDUCER = LOOT_MODS.register(
|
||||
"amethyst_shard_reducer", AmethystShardReducerModifier.Serializer::new);
|
||||
|
||||
public HexLootModifiers(DataGenerator gen) {
|
||||
super(gen, HexMod.MOD_ID);
|
||||
super(gen, HexAPI.MOD_ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -50,7 +50,7 @@ public class HexLootModifiers extends GlobalLootModifierProvider {
|
|||
}));
|
||||
|
||||
add("amethyst_cluster_dust", PaucalLootMods.ADD_ITEM.get(), new PaucalAddItemModifier(
|
||||
HexItems.AMETHYST_DUST.get(), new LootItemFunction[]{
|
||||
HexItems.AMETHYST_DUST, new LootItemFunction[]{
|
||||
SetItemCountFunction.setCount(UniformGenerator.between(1, 4)).build(),
|
||||
ApplyBonusCount.addOreBonusCount(Enchantments.BLOCK_FORTUNE).build()
|
||||
}, new LootItemCondition[]{
|
||||
|
@ -62,7 +62,7 @@ public class HexLootModifiers extends GlobalLootModifierProvider {
|
|||
}
|
||||
));
|
||||
add("amethyst_cluster_charged", PaucalLootMods.ADD_ITEM.get(), new PaucalAddItemModifier(
|
||||
HexItems.CHARGED_AMETHYST.get(), 1, new LootItemCondition[]{
|
||||
HexItems.CHARGED_AMETHYST, 1, new LootItemCondition[]{
|
||||
LootTableIdCondition.builder(amethystCluster).build(),
|
||||
MatchTool.toolMatches(
|
||||
ItemPredicate.Builder.item().hasEnchantment(
|
||||
|
|
|
@ -2,8 +2,8 @@ package at.petrak.hexcasting.forge.datagen.lootmods;
|
|||
|
||||
import at.petrak.hexcasting.api.PatternRegistry;
|
||||
import at.petrak.hexcasting.api.spell.math.HexPattern;
|
||||
import at.petrak.hexcasting.common.lib.HexItems;
|
||||
import at.petrak.hexcasting.common.items.ItemScroll;
|
||||
import at.petrak.hexcasting.common.lib.HexItems;
|
||||
import com.google.gson.JsonObject;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
@ -55,7 +55,7 @@ public class PatternScrollModifier extends LootModifier {
|
|||
tag.put(ItemScroll.TAG_PATTERN,
|
||||
HexPattern.FromAnglesSig(pattern, startDir).serializeToNBT());
|
||||
|
||||
var stack = new ItemStack(HexItems.SCROLL.get());
|
||||
var stack = new ItemStack(HexItems.SCROLL);
|
||||
stack.setTag(tag);
|
||||
generatedLoot.add(stack);
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package at.petrak.hexcasting.forge.network;
|
||||
|
||||
import at.petrak.hexcasting.ForgeHexInitializer;
|
||||
import at.petrak.hexcasting.common.network.*;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraftforge.network.NetworkEvent;
|
||||
|
@ -14,10 +12,12 @@ import java.util.function.BiConsumer;
|
|||
import java.util.function.Consumer;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static at.petrak.hexcasting.api.HexAPI.modLoc;
|
||||
|
||||
public class ForgePacketHandler {
|
||||
private static final String PROTOCOL_VERSION = "1";
|
||||
private static final SimpleChannel NETWORK = NetworkRegistry.newSimpleChannel(
|
||||
new ResourceLocation(ForgeHexInitializer.MOD_ID, "main"),
|
||||
modLoc("main"),
|
||||
() -> PROTOCOL_VERSION,
|
||||
PROTOCOL_VERSION::equals,
|
||||
PROTOCOL_VERSION::equals
|
||||
|
|
|
@ -11,11 +11,15 @@ import net.minecraft.client.renderer.ItemBlockRenderTypes;
|
|||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.entity.EntityRendererProvider;
|
||||
import net.minecraft.client.renderer.entity.EntityRenderers;
|
||||
import net.minecraft.client.renderer.item.ItemProperties;
|
||||
import net.minecraft.client.renderer.item.ItemPropertyFunction;
|
||||
import net.minecraft.core.particles.ParticleOptions;
|
||||
import net.minecraft.core.particles.ParticleType;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.inventory.tooltip.TooltipComponent;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
|
@ -48,4 +52,9 @@ public class ForgeClientXplatImpl implements IClientXplatAbstractions {
|
|||
public <T extends ClientTooltipComponent & TooltipComponent> void registerIdentityTooltipMapping(Class<T> clazz) {
|
||||
MinecraftForgeClient.registerTooltipComponentFactory(clazz, Function.identity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerItemProperty(Item item, ResourceLocation id, ItemPropertyFunction func) {
|
||||
ItemProperties.register(item, id, func);
|
||||
}
|
||||
}
|
||||
|
|
57
build.gradle
57
build.gradle
|
@ -1,7 +1,64 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath group: 'com.diluv.schoomp', name: 'Schoomp', version: '1.1.0'
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'java'
|
||||
}
|
||||
|
||||
def isRelease() {
|
||||
try {
|
||||
def stdout = new ByteArrayOutputStream()
|
||||
def gitHash = System.getenv('GIT_COMMIT')
|
||||
def gitPrevHash = System.getenv('GIT_PREVIOUS_COMMIT')
|
||||
def travisRange = System.getenv('TRAVIS_COMMIT_RANGE')
|
||||
if (gitHash && gitPrevHash) {
|
||||
exec {
|
||||
commandLine 'git', 'log', '--pretty=tformat:- %s', '' + gitPrevHash + '...' + gitHash
|
||||
standardOutput = stdout
|
||||
}
|
||||
return stdout.toString().toLowerCase().contains("[release")
|
||||
} else if (travisRange) {
|
||||
exec {
|
||||
commandLine 'git', 'log', '--pretty=tformat:- %s', '' + travisRange
|
||||
standardOutput = stdout
|
||||
}
|
||||
return stdout.toString().toLowerCase().contains("[release")
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
} catch (ignored) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
String getVersion(String platform) {
|
||||
def v = "${modVersion}"
|
||||
if (!isRelease() && System.getenv('BUILD_NUMBER') != null) {
|
||||
v += "-prerelease-" + System.getenv('BUILD_NUMBER')
|
||||
} else if (System.getenv('TAG_NAME') != null) {
|
||||
v = System.getenv('TAG_NAME').substring(1)
|
||||
println 'Version overridden to tag version ' + version
|
||||
}
|
||||
v += "-" + platform
|
||||
return v
|
||||
}
|
||||
|
||||
subprojects {
|
||||
|
||||
apply plugin: 'java'
|
||||
// apply plugin: 'kotlin'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
group = "at.petra-k.$modID" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "${modID}-${minecraftVersion}"
|
||||
// Version is fixed up in each gradle
|
||||
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
java.withSourcesJar()
|
||||
|
|
|
@ -9,7 +9,7 @@ modName=Hex Casting
|
|||
minecraftVersion=1.18.2
|
||||
modVersion=0.9.0
|
||||
|
||||
paucalVersion=0.3.4
|
||||
paucalVersion=0.4.0-prerelease-15
|
||||
patchouliVersion=67
|
||||
jeiVersion=9.5.3.143
|
||||
|
||||
|
|
Loading…
Reference in a new issue