Skip to content

Commit

Permalink
Redo textures for machine blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaTheMartian committed Jun 10, 2024
1 parent b628562 commit a85c6b2
Show file tree
Hide file tree
Showing 33 changed files with 111 additions and 324 deletions.
5 changes: 3 additions & 2 deletions src/generated/resources/assets/arcane/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@
"gui.arcane.jei.purifying": "Purifying",
"item.arcane.arcane_bleach": "Arcane Bleach",
"item.arcane.aura_configurator": "Configaurator",
"item.arcane.aura_configurator.tooltip.1": "Used to configure and pair machinery.",
"item.arcane.aura_configurator.tooltip.1": "Used to configure machinery.",
"item.arcane.aura_configurator.tooltip.2": "Pronounced config-aura-tor.",
"item.arcane.aura_wrench": "Aurawrench",
"item.arcane.aura_wrench.tooltip": "Use while sneaking to quickly break machinery.",
"item.arcane.aura_wrench.tooltip.1": "Used to pair machinery.",
"item.arcane.aura_wrench.tooltip.2": "Use while sneaking to quickly break machinery.",
"item.arcane.aurachalcum": "Aurachalcum",
"item.arcane.aurachalcum_core": "Aurachalcum Focus",
"item.arcane.auraglass_bottle": "Auraglass Bottle",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"parent": "minecraft:block/cube_bottom_top",
"textures": {
"bottom": "arcane:block/machines/collectors/top_and_bottom",
"side": "arcane:block/machines/collectors/aqua_sides",
"top": "arcane:block/machines/collectors/top_and_bottom"
"bottom": "minecraft:block/polished_deepslate",
"side": "arcane:block/machines/aqua_collector",
"top": "minecraft:block/polished_deepslate"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"parent": "minecraft:block/cube_bottom_top",
"textures": {
"bottom": "arcane:block/machines/collectors/top_and_bottom",
"side": "arcane:block/machines/collectors/ignis_sides",
"top": "arcane:block/machines/collectors/top_and_bottom"
"bottom": "minecraft:block/polished_deepslate",
"side": "arcane:block/machines/ignis_collector",
"top": "minecraft:block/polished_deepslate"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"category": "redstone",
"key": {
"B": {
"tag": "c:ingots/copper"
"item": "minecraft:deepslate_bricks"
},
"C": {
"item": "arcane:copper_core"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"type": "minecraft:crafting_shaped",
"category": "redstone",
"key": {
"B": {
"A": {
"item": "arcane:copper_core"
},
"S": {
"tag": "c:stones"
"D": {
"item": "minecraft:deepslate_bricks"
}
},
"pattern": [
"SSS",
" B "
" A ",
"DDD"
],
"result": {
"count": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"item": "arcane:copper_core"
},
"O": {
"tag": "c:obsidians"
"item": "minecraft:deepslate_bricks"
}
},
"pattern": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"tag": "c:ingots/copper"
},
"S": {
"tag": "c:stones"
"item": "minecraft:deepslate_bricks"
}
},
"pattern": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"type": "minecraft:crafting_shapeless",
"category": "equipment",
"ingredients": [
{
"item": "arcane:auraglass_dust"
},
{
"item": "minecraft:glass_bottle"
},
{
"item": "minecraft:bone_meal"
},
{
"item": "arcane:auraglass_dust"
}
],
"result": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"category": "misc",
"ingredients": [
{
"tag": "c:obsidians"
"item": "arcane:polished_idocrase"
},
{
"tag": "c:obsidians"
},
{
"item": "arcane:polished_idocrase"
"tag": "c:obsidians"
}
],
"result": {
Expand Down
7 changes: 2 additions & 5 deletions src/main/java/martian/arcane/common/item/ItemAuraWrench.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ public InteractionResultHolder<ItemStack> use(@NotNull Level level, @NotNull Pla
if (hitState.is(ArcaneTags.AURA_WRENCH_BREAKABLE)) {
level.destroyBlock(hit.getBlockPos(), true);
}

// BlockEntity l = level.getBlockEntity(hit.getBlockPos());
// if (l instanceof BlockEntityAuraConnector connector)
// connector.removeTarget();
}

return InteractionResultHolder.success(stack);
Expand Down Expand Up @@ -102,7 +98,8 @@ public InteractionResultHolder<ItemStack> use(@NotNull Level level, @NotNull Pla
@ParametersAreNonnullByDefault
public void appendHoverText(ItemStack stack, TooltipContext context, List<Component> text, TooltipFlag flag) {
super.appendHoverText(stack, context, text, flag);
text.add(Component.translatable("item.arcane.aura_wrench.tooltip"));
text.add(Component.translatable("item.arcane.aura_wrench.tooltip.1"));
text.add(Component.translatable("item.arcane.aura_wrench.tooltip.2"));
if (stack.has(ArcaneDataComponents.TARGET_POS)) {
text.add(Component
.translatable("messages.arcane.linking_from")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ public class ArcaneItems extends ArcaneRegistry {
AURAOMETER = register("auraometer", ItemAuraometer::new),
AURA_WRENCH = register("aura_wrench", ItemAuraWrench::new),
AURA_CONFIGURATOR = register("aura_configurator", ItemAuraConfigurator::new),
GEM_SAW = register("gem_saw", ItemGemSaw::new),
SPELL_TABLET = register("spell_tablet", ItemSpellTablet::new),
ARCANE_BLEACH = basicItem("arcane_bleach"),
SPELL_CHALK = register("spell_chalk", ItemSpellChalk::new),
ENDERPACK = register("enderpack", ItemEnderpack::new),
AXOBOTTLE = basicItem("axobottle"),
GUIDEBOOK = register("guidebook", ItemGuidebook::new),
GEM_SAW = register("gem_saw", ItemGemSaw::new),

UPGRADE_KIT_COPPER = register("upgrade_kit_copper", () -> new ItemUpgradeKit(MachineTier.COPPER)),
UPGRADE_KIT_LARIMAR = register("upgrade_kit_larimar", () -> new ItemUpgradeKit(MachineTier.LARIMAR)),
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/martian/arcane/datagen/ArcaneDatagen.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
import martian.arcane.datagen.server.book.ArcaneBookProvider;
import net.minecraft.core.HolderLookup;
import net.minecraft.data.DataGenerator;
import net.minecraft.data.DataProvider;
import net.minecraft.data.PackOutput;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.neoforge.common.data.BlockTagsProvider;
import net.neoforged.neoforge.common.data.ExistingFileHelper;
import net.neoforged.neoforge.data.event.GatherDataEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,9 @@ public ArcaneBlockStateProvider(PackOutput output, ExistingFileHelper existingFi
protected void registerStatesAndModels() {
// Models
{
// Machines
// withExistingParent(ArcaneBlocks.AURA_CONNECTOR.get(), ArcaneMod.id("block/"))
// .texture("0", ArcaneMod.id("block/machines/aura_extractors/copper"));

// withExistingParent(ArcaneBlocks.AURA_BASIN.get(), ArcaneMod.id("block/aura_basin"))
// .texture("0", ArcaneMod.id("block/machines/aura_basin_copper"));
// withExistingParent(ArcaneBlocks.LARIMAR_AURA_BASIN.get(), ArcaneMod.id("block/base/aura_basin"))
// .texture("0", ArcaneMod.id("block/machines/aura_basin_larimar"));
// withExistingParent(ArcaneBlocks.AURACHALCUM_AURA_BASIN.get(), ArcaneMod.id("block/base/aura_basin"))
// .texture("0", ArcaneMod.id("block/machines/aura_basin_aurachalcum"));
// withExistingParent(ArcaneBlocks.CREATIVE_AURA_BASIN.get(), ArcaneMod.id("block/base/aura_basin"))
// .texture("0", ArcaneMod.id("block/machines/aura_basin_copper"));

// Generators
topBottom(ArcaneBlocks.HEAT_COLLECTOR.get(), texture("machines/collectors/ignis_sides"), texture("machines/collectors/top_and_bottom"));
topBottom(ArcaneBlocks.AQUA_COLLECTOR.get(), texture("machines/collectors/aqua_sides"), texture("machines/collectors/top_and_bottom"));
topBottom(ArcaneBlocks.HEAT_COLLECTOR.get(), texture("machines/ignis_collector"), new ResourceLocation("minecraft", "block/polished_deepslate"));
topBottom(ArcaneBlocks.AQUA_COLLECTOR.get(), texture("machines/aqua_collector"), new ResourceLocation("minecraft", "block/polished_deepslate"));

// General Blocks
simpleTranslucent(ArcaneBlocks.AURAGLASS.get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ protected void addTranslations() {

// Item Tooltips
add("item.arcane.auraometer.tooltip", "Shows information about blocks that possess Aura when held.");
add("item.arcane.aura_wrench.tooltip", "Use while sneaking to quickly break machinery.");
add("item.arcane.aura_configurator.tooltip.1", "Used to configure and pair machinery.");
add("item.arcane.aura_wrench.tooltip.1", "Used to pair machinery.");
add("item.arcane.aura_wrench.tooltip.2", "Use while sneaking to quickly break machinery.");
add("item.arcane.aura_configurator.tooltip.1", "Used to configure machinery.");
add("item.arcane.aura_configurator.tooltip.2", "Pronounced config-aura-tor.");
add("item.arcane.spell_tablet.tooltip", "Stores the spell inscribed upon it.");
}
Expand Down
113 changes: 46 additions & 67 deletions src/main/java/martian/arcane/datagen/server/ArcaneRecipeProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import martian.arcane.ArcaneMod;
import martian.arcane.ArcaneTags;
import martian.arcane.api.NBTHelpers;
import martian.arcane.common.registry.ArcaneBlocks;
import martian.arcane.common.registry.ArcaneDataComponents;
import martian.arcane.common.registry.ArcaneItems;
Expand All @@ -14,14 +13,15 @@
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.data.PackOutput;
import net.minecraft.data.recipes.*;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.ItemLike;
import net.minecraft.world.level.block.Blocks;
import net.neoforged.neoforge.common.Tags;

import java.util.HashMap;
Expand Down Expand Up @@ -50,17 +50,18 @@ protected void build() {
;

final Ingredient
AURAGLASS = ingOf(ArcaneBlocks.AURAGLASS.get().asItem()),
AURAGLASS_DUST = ingOf(ArcaneItems.AURAGLASS_DUST.get()),
COPPER_CORE = ingOf(ArcaneItems.COPPER_CORE.get()),
LARIMAR_CORE = ingOf(ArcaneItems.LARIMAR_CORE.get()),
AURACHALCUM_CORE = ingOf(ArcaneItems.AURACHALCUM_CORE.get()),
ELDRITCH_CORE = ingOf(ArcaneItems.ELDRITCH_CORE.get()),
SPELL_CIRCLE_CORE = ingOf(ArcaneItems.SPELL_CIRCLE_CORE.get()),
POLISHED_LARIMAR = ingOf(ArcaneItems.POLISHED_LARIMAR.get()),
FADED_LARIMAR = ingOf(ArcaneItems.FADED_POLISHED_LARIMAR.get()),
AURACHALCUM = ingOf(ArcaneItems.AURACHALCUM.get()),
ELDRITCH_ALLOY = ingOf(ArcaneItems.ELDRITCH_ALLOY.get())
DEEPSLATE = ingOf(Blocks.DEEPSLATE_BRICKS.asItem()),
AURAGLASS = ingOf(ArcaneBlocks.AURAGLASS.asItem()),
AURAGLASS_DUST = ingOf(ArcaneItems.AURAGLASS_DUST),
COPPER_CORE = ingOf(ArcaneItems.COPPER_CORE),
LARIMAR_CORE = ingOf(ArcaneItems.LARIMAR_CORE),
AURACHALCUM_CORE = ingOf(ArcaneItems.AURACHALCUM_CORE),
ELDRITCH_CORE = ingOf(ArcaneItems.ELDRITCH_CORE),
SPELL_CIRCLE_CORE = ingOf(ArcaneItems.SPELL_CIRCLE_CORE),
POLISHED_LARIMAR = ingOf(ArcaneItems.POLISHED_LARIMAR),
FADED_LARIMAR = ingOf(ArcaneItems.FADED_POLISHED_LARIMAR),
AURACHALCUM = ingOf(ArcaneItems.AURACHALCUM),
ELDRITCH_ALLOY = ingOf(ArcaneItems.ELDRITCH_ALLOY)
;

// Materials
Expand Down Expand Up @@ -142,6 +143,37 @@ protected void build() {
{
helper.defaultCategory = RecipeCategory.REDSTONE;

// Machines
shaped(ArcaneBlocks.PEDESTAL.get().asItem())
.pattern("CBC", " S ", "SSS")
.define('C', COPPER)
.define('S', DEEPSLATE)
.define('B', COPPER_CORE)
.unlockedWith(ArcaneItems.COPPER_CORE.get())
.save();

shaped(ArcaneBlocks.AURA_INFUSER.asItem())
.pattern("BCB", " O ", "OOO")
.define('B', COPPER)
.define('C', COPPER_CORE)
.define('O', DEEPSLATE)
.unlockedWith(ArcaneItems.COPPER_CORE.get())
.save();

shaped(ArcaneBlocks.AURA_BASIN.asItem())
.pattern("B B", "B B", "BCB")
.define('B', DEEPSLATE)
.define('C', COPPER_CORE)
.unlockedWith(ArcaneItems.COPPER_CORE.get())
.save();

shaped(ArcaneBlocks.AURA_CONNECTOR.asItem())
.pattern(" A ", "DDD")
.define('A', COPPER_CORE)
.define('D', DEEPSLATE)
.unlockedWith(ArcaneItems.COPPER_CORE.get())
.save();

shaped(ArcaneBlocks.HEAT_COLLECTOR.get().asItem())
.pattern("GIG", "FCF", "GIG")
.define('G', GLASS)
Expand All @@ -159,32 +191,6 @@ protected void build() {
.define('C', COPPER_CORE)
.unlockedWith(ArcaneItems.COPPER_CORE.get())
.save();

shaped(ArcaneBlocks.PEDESTAL.get().asItem())
.pattern("CBC", " S ", "SSS")
.define('C', COPPER)
.define('S', STONE)
.define('B', COPPER_CORE)
.unlockedWith(ArcaneItems.COPPER_CORE.get())
.save();

// Machines
{
shaped(ArcaneBlocks.AURA_INFUSER.get().asItem())
.pattern("BCB", " O ", "OOO")
.define('B', COPPER)
.define('C', COPPER_CORE)
.define('O', OBSIDIAN)
.unlockedWith(ArcaneItems.COPPER_CORE.get())
.save();

makeBasin(ArcaneBlocks.AURA_BASIN.asItem(), COPPER_CORE, Ingredient.of(COPPER));
makeExtractor(ArcaneBlocks.AURA_CONNECTOR.asItem(), COPPER_CORE, Ingredient.of(STONE));

// makeBasin(ArcaneBlocks.COPPER_AURA_BASIN.get().asItem(), COPPER_CORE, Ingredient.of(COPPER));
// makeBasin(ArcaneBlocks.LARIMAR_AURA_BASIN.get().asItem(), LARIMAR_CORE, POLISHED_LARIMAR);
// makeBasin(ArcaneBlocks.AURACHALCUM_AURA_BASIN.get().asItem(), AURACHALCUM_CORE, AURACHALCUM);
}
}

// Tools
Expand Down Expand Up @@ -382,33 +388,6 @@ private void cutAndPolish(Item raw, Item cut, Item polished) {
.save();
}

private void makeBasin(Item result, Ingredient core, Ingredient base) {
shaped(result)
.pattern("B B", "B B", "BCB")
.define('B', base)
.define('C', core)
.unlockedWith(core.getItems()[0].getItem())
.save();
}

private void makeInserter(Item result, Ingredient core, Ingredient base) {
shaped(result)
.pattern(" B ", "SSS")
.define('B', core)
.define('S', base)
.unlockedWith(core.getItems()[0].getItem())
.save();
}

private void makeExtractor(Item result, Ingredient core, Ingredient base) {
shaped(result)
.pattern("SSS", " B ")
.define('B', core)
.define('S', base)
.unlockedWith(core.getItems()[0].getItem())
.save();
}

private void oreProcessingLine(Item raw, Item crushed, Item purified, Item ingot) {
SpellRecipeBuilder.hammering()
.setInput(raw)
Expand All @@ -431,7 +410,7 @@ private ResourceLocation itemKey(Item item) {
return BuiltInRegistries.ITEM.getKey(item);
}

private Ingredient ingOf(Item item) {
private Ingredient ingOf(ItemLike item) {
return Ingredient.of(item);
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/arcane/models/block/aura_basin.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"render_type": "minecraft:translucent",
"texture_size": [64, 64],
"textures": {
"0": "arcane:block/machines/aura_basin_copper",
"particle": "arcane:block/machines/aura_basin_copper"
"0": "arcane:block/machines/aura_basin",
"particle": "arcane:block/machines/aura_basin"
},
"elements": [
{
Expand Down
Loading

0 comments on commit a85c6b2

Please sign in to comment.