diff --git a/src/main/java/net/superscary/fluxmachines/api/blockentity/Crafter.java b/src/main/java/net/superscary/fluxmachines/api/blockentity/Crafter.java index 52c15cf..d8d0acb 100644 --- a/src/main/java/net/superscary/fluxmachines/api/blockentity/Crafter.java +++ b/src/main/java/net/superscary/fluxmachines/api/blockentity/Crafter.java @@ -3,10 +3,11 @@ import net.minecraft.world.item.crafting.Recipe; import net.minecraft.world.item.crafting.RecipeHolder; import net.minecraft.world.item.crafting.RecipeType; +import net.superscary.fluxmachines.api.inventory.InventoryHolder; import java.util.Optional; -public interface Crafter> { +public interface Crafter> extends InventoryHolder { void craftItem (); @@ -24,4 +25,6 @@ public interface Crafter> { boolean hasFinished (); + boolean isCrafting(); + } diff --git a/src/main/java/net/superscary/fluxmachines/api/inventory/InventoryHolder.java b/src/main/java/net/superscary/fluxmachines/api/inventory/InventoryHolder.java new file mode 100644 index 0000000..2383a2d --- /dev/null +++ b/src/main/java/net/superscary/fluxmachines/api/inventory/InventoryHolder.java @@ -0,0 +1,9 @@ +package net.superscary.fluxmachines.api.inventory; + +import net.neoforged.neoforge.items.ItemStackHandler; + +public interface InventoryHolder { + + ItemStackHandler getInventory(); + +} diff --git a/src/main/java/net/superscary/fluxmachines/blockentity/base/FMBaseBlockEntity.java b/src/main/java/net/superscary/fluxmachines/blockentity/base/FMBaseBlockEntity.java index 19d25b5..89aedd2 100644 --- a/src/main/java/net/superscary/fluxmachines/blockentity/base/FMBaseBlockEntity.java +++ b/src/main/java/net/superscary/fluxmachines/blockentity/base/FMBaseBlockEntity.java @@ -7,10 +7,7 @@ import net.minecraft.network.protocol.game.ClientGamePacketListener; import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; import net.minecraft.server.level.ServerLevel; -import net.minecraft.world.Containers; -import net.minecraft.world.InteractionResult; -import net.minecraft.world.MenuProvider; -import net.minecraft.world.SimpleContainer; +import net.minecraft.world.*; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; @@ -23,14 +20,13 @@ import net.minecraft.world.phys.BlockHitResult; import net.neoforged.neoforge.items.ItemStackHandler; import net.superscary.fluxmachines.api.data.BlockData; +import net.superscary.fluxmachines.api.inventory.InventoryHolder; +import net.superscary.fluxmachines.hook.WrenchHook; import net.superscary.fluxmachines.util.keys.Keys; -import org.jetbrains.annotations.MustBeInvokedByOverriders; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.List; - -public abstract class FMBaseBlockEntity extends BlockEntity implements MenuProvider, BlockData { +public abstract class FMBaseBlockEntity extends BlockEntity implements MenuProvider, BlockData, InventoryHolder { public final ItemStackHandler INVENTORY_SINGLE = new ItemStackHandler(1) { @Override @@ -87,11 +83,6 @@ public Packet getUpdatePacket () { return ClientboundBlockEntityDataPacket.create(this); } - @MustBeInvokedByOverriders - public void addAdditionalDrops (Level level, BlockPos pos, List drops) { - - } - @Override public @NotNull CompoundTag getUpdateTag (HolderLookup.@NotNull Provider registries) { return saveWithoutMetadata(registries); @@ -112,6 +103,11 @@ public void handleUpdateTag (@NotNull CompoundTag tag, HolderLookup.@NotNull Pro loadClientData(tag, lookupProvider); } + /** + * Save entity data to the dropped item + * @param stack + * @param registries + */ @Override public void saveToItem (@NotNull ItemStack stack, HolderLookup.@NotNull Provider registries) { super.saveToItem(stack, registries); @@ -132,6 +128,15 @@ public void drops () { Containers.dropContents(level, worldPosition, container); } + /** + * TODO: save data to item and drop that item rather than drop contents. + * Allows disassembly with wrench. Called by {@link WrenchHook#onPlayerUseBlock(Player, Level, InteractionHand, BlockHitResult)} + * @param player {@link Player} the player + * @param level {@link Level} the level + * @param hitResult {@link BlockHitResult} hit result of the interaction + * @param wrench the {@link ItemStack} used. Already checked to contain {@link net.superscary.fluxmachines.util.tags.FMTag.Items#WRENCH} + * @return {@link InteractionResult} + */ public InteractionResult disassembleWithWrench (Player player, Level level, BlockHitResult hitResult, ItemStack wrench) { var pos = hitResult.getBlockPos(); var state = level.getBlockState(pos); @@ -141,7 +146,7 @@ public InteractionResult disassembleWithWrench (Player player, Level level, Bloc var drops = Block.getDrops(state, serverLevel, pos, this, player, wrench); for (var item : drops) { - player.getInventory().placeItemBackInInventory(item); + Containers.dropItemStack(level, pos.getX(), pos.getY(), pos.getZ(), item); } } @@ -151,6 +156,7 @@ public InteractionResult disassembleWithWrench (Player player, Level level, Bloc return InteractionResult.sidedSuccess(level.isClientSide()); } + @Override public ItemStackHandler getInventory () { return inventory; } diff --git a/src/main/java/net/superscary/fluxmachines/blockentity/machine/FluxFurnaceBlockEntity.java b/src/main/java/net/superscary/fluxmachines/blockentity/machine/FluxFurnaceBlockEntity.java index 029653a..ad4e7e8 100644 --- a/src/main/java/net/superscary/fluxmachines/blockentity/machine/FluxFurnaceBlockEntity.java +++ b/src/main/java/net/superscary/fluxmachines/blockentity/machine/FluxFurnaceBlockEntity.java @@ -170,6 +170,7 @@ public int getEnergyAmount () { return 8; } + @Override public boolean isCrafting () { return isCrafting; } diff --git a/src/main/java/net/superscary/fluxmachines/core/FluxMachinesBase.java b/src/main/java/net/superscary/fluxmachines/core/FluxMachinesBase.java index 73e0379..b83f535 100644 --- a/src/main/java/net/superscary/fluxmachines/core/FluxMachinesBase.java +++ b/src/main/java/net/superscary/fluxmachines/core/FluxMachinesBase.java @@ -14,7 +14,7 @@ import net.neoforged.neoforge.event.server.ServerStoppingEvent; import net.neoforged.neoforge.registries.RegisterEvent; import net.neoforged.neoforge.server.ServerLifecycleHooks; -import net.superscary.fluxmachines.datagen.DataGenerators; +import net.superscary.fluxmachines.hook.HammerHook; import net.superscary.fluxmachines.hook.WrenchHook; import net.superscary.fluxmachines.impl.top.FMTopPlugin; import net.superscary.fluxmachines.item.material.FMArmorMaterials; @@ -59,6 +59,7 @@ public FluxMachinesBase (IEventBus modEventBus) { NeoForge.EVENT_BUS.addListener(this::serverStopped); NeoForge.EVENT_BUS.addListener(this::serverStopping); NeoForge.EVENT_BUS.addListener(WrenchHook::onPlayerUseBlockEvent); + NeoForge.EVENT_BUS.addListener(HammerHook::onPlayerUseBlockEvent); } diff --git a/src/main/java/net/superscary/fluxmachines/core/Tab.java b/src/main/java/net/superscary/fluxmachines/core/Tab.java index e0fdbc4..3de1ccf 100644 --- a/src/main/java/net/superscary/fluxmachines/core/Tab.java +++ b/src/main/java/net/superscary/fluxmachines/core/Tab.java @@ -25,7 +25,7 @@ public class Tab { public static void init (Registry registry) { var tab = CreativeModeTab.builder() .title(Component.translatable("itemGroup.fluxmachines")) - .icon(FMItems.DURACITE_INGOT::stack) + .icon(FMItems.STEEL_INGOT::stack) .displayItems(Tab::buildDisplayItems) .build(); Registry.register(registry, Keys.MAIN, tab); diff --git a/src/main/java/net/superscary/fluxmachines/datagen/providers/data/AchievementProvider.java b/src/main/java/net/superscary/fluxmachines/datagen/providers/data/AchievementProvider.java index ded7a5c..d6228f9 100644 --- a/src/main/java/net/superscary/fluxmachines/datagen/providers/data/AchievementProvider.java +++ b/src/main/java/net/superscary/fluxmachines/datagen/providers/data/AchievementProvider.java @@ -23,7 +23,7 @@ import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; -import static net.superscary.fluxmachines.registries.FMItems.DURACITE_INGOT; +import static net.superscary.fluxmachines.registries.FMItems.STEEL_INGOT; import static net.superscary.fluxmachines.registries.FMItems.HARD_BOILED_EGG; public class AchievementProvider extends AdvancementProvider { @@ -78,7 +78,7 @@ private static void buildParents (Consumer consumer, Existing .save(consumer, FluxMachines.getResource("advancements/newworld"), existingFileHelper); strongerThanIron = Advancement.Builder.advancement() - .display(DURACITE_INGOT, + .display(STEEL_INGOT, Component.translatable("advancement.fluxmachines.strongerthaniron.title"), Component.translatable("advancement.fluxmachines.strongerthaniron.desc"), null, @@ -89,7 +89,7 @@ private static void buildParents (Consumer consumer, Existing ) .parent(parent) .requirements(AdvancementRequirements.Strategy.OR) - .addCriterion("has_duracite", InventoryChangeTrigger.TriggerInstance.hasItems(ItemPredicate.Builder.item().of(DURACITE_INGOT))) + .addCriterion("has_steel", InventoryChangeTrigger.TriggerInstance.hasItems(ItemPredicate.Builder.item().of(STEEL_INGOT))) .save(consumer, FluxMachines.getResource("advancements/stronger_than_iron"), existingFileHelper); buildCasing = Advancement.Builder.advancement() diff --git a/src/main/java/net/superscary/fluxmachines/datagen/providers/lang/FMEnLangProvider.java b/src/main/java/net/superscary/fluxmachines/datagen/providers/lang/FMEnLangProvider.java index 96b94eb..d1838c2 100644 --- a/src/main/java/net/superscary/fluxmachines/datagen/providers/lang/FMEnLangProvider.java +++ b/src/main/java/net/superscary/fluxmachines/datagen/providers/lang/FMEnLangProvider.java @@ -3,7 +3,6 @@ import net.minecraft.data.DataGenerator; import net.neoforged.neoforge.common.data.LanguageProvider; import net.superscary.fluxmachines.api.data.IDataProvider; -import net.superscary.fluxmachines.block.machine.FluxFurnaceBlock; import net.superscary.fluxmachines.core.FluxMachines; import static net.superscary.fluxmachines.registries.FMBlocks.*; @@ -24,31 +23,26 @@ protected void addTranslations () { } protected void blocks () { - add(DURACITE_ORE.block(), "Duracite Ore"); - add(DURACITE_DEEPSLATE_ORE.block(), "Deepslate Duracite Ore"); - add(DURACITE_NETHER_ORE.block(), "Duracite Nether Ore"); - add(DURACITE_BLOCK_RAW.block(), "Raw Duracite Block"); - add(DURACITE_BLOCK.block(), "Duracite Block"); + add(STEEL_BLOCK.block(), "Steel Block"); add(MACHINE_CASING.block(), "Machine Casing"); add(FLUX_FURNACE.block(), "Flux Furnace"); } protected void items () { - add(RAW_DURACITE.asItem(), "Raw Duracite"); - add(DURACITE_DUST.asItem(), "Duracite Dust"); - add(DURACITE_INGOT.asItem(), "Duracite Ingot"); - add(DURACITE_NUGGET.asItem(), "Duracite Nugget"); - add(DURACITE_HELMET.asItem(), "Duracite Helmet"); - add(DURACITE_CHESTPLATE.asItem(), "Duracite Chestplate"); - add(DURACITE_LEGGINGS.asItem(), "Duracite Leggings"); - add(DURACITE_BOOTS.asItem(), "Duracite Boots"); - add(DURACITE_SWORD.asItem(), "Duracite Sword"); - add(DURACITE_PICKAXE.asItem(), "Duracite Pickaxe"); - add(DURACITE_SHOVEL.asItem(), "Duracite Shovel"); - add(DURACITE_AXE.asItem(), "Duracite Axe"); - add(DURACITE_HOE.asItem(), "Duracite Hoe"); - add(DURACITE_PAXEL.asItem(), "Duracite Paxel"); - add(DURACITE_HAMMER.asItem(), "Duracite Hammer"); + add(STEEL_DUST.asItem(), "Steel Dust"); + add(STEEL_INGOT.asItem(), "Steel Ingot"); + add(STEEL_NUGGET.asItem(), "Steel Nugget"); + add(STEEL_HELMET.asItem(), "Steel Helmet"); + add(STEEL_CHESTPLATE.asItem(), "Steel Chestplate"); + add(STEEL_LEGGINGS.asItem(), "Steel Leggings"); + add(STEEL_BOOTS.asItem(), "Steel Boots"); + add(STEEL_SWORD.asItem(), "Steel Sword"); + add(STEEL_PICKAXE.asItem(), "Steel Pickaxe"); + add(STEEL_SHOVEL.asItem(), "Steel Shovel"); + add(STEEL_AXE.asItem(), "Steel Axe"); + add(STEEL_HOE.asItem(), "Steel Hoe"); + add(STEEL_PAXEL.asItem(), "Steel Paxel"); + add(STEEL_HAMMER.asItem(), "Steel Hammer"); add(WRENCH.asItem(), "Wrench"); add(HONEY_BUN.asItem(), "Honey Bun"); diff --git a/src/main/java/net/superscary/fluxmachines/datagen/providers/loot/DropProvider.java b/src/main/java/net/superscary/fluxmachines/datagen/providers/loot/DropProvider.java index eb9e89f..c0c99f8 100644 --- a/src/main/java/net/superscary/fluxmachines/datagen/providers/loot/DropProvider.java +++ b/src/main/java/net/superscary/fluxmachines/datagen/providers/loot/DropProvider.java @@ -38,9 +38,6 @@ public class DropProvider extends BlockLootSubProvider { @NotNull private ImmutableMap> createOverrides () { return ImmutableMap.>builder() - .put(DURACITE_ORE.block(), oreBlock(DURACITE_ORE.block(), RAW_DURACITE.asItem())) - .put(DURACITE_DEEPSLATE_ORE.block(), oreBlock(DURACITE_DEEPSLATE_ORE.block(), RAW_DURACITE.asItem())) - .put(DURACITE_NETHER_ORE.block(), oreBlock(DURACITE_NETHER_ORE.block(), DURACITE_NUGGET.asItem())) .build(); } diff --git a/src/main/java/net/superscary/fluxmachines/datagen/providers/models/BlockModelProvider.java b/src/main/java/net/superscary/fluxmachines/datagen/providers/models/BlockModelProvider.java index cb91c5a..232aad9 100644 --- a/src/main/java/net/superscary/fluxmachines/datagen/providers/models/BlockModelProvider.java +++ b/src/main/java/net/superscary/fluxmachines/datagen/providers/models/BlockModelProvider.java @@ -29,11 +29,7 @@ public BlockModelProvider (PackOutput output, ExistingFileHelper exFileHelper) { @Override protected void registerStatesAndModels () { - blockWithItem(DURACITE_ORE); - blockWithItem(DURACITE_DEEPSLATE_ORE); - blockWithItem(DURACITE_NETHER_ORE); - blockWithItem(DURACITE_BLOCK_RAW); - blockWithItem(DURACITE_BLOCK); + blockWithItem(STEEL_BLOCK); blockWithItem(MACHINE_CASING); machine(FLUX_FURNACE, "flux_furnace"); diff --git a/src/main/java/net/superscary/fluxmachines/datagen/providers/models/FMBlockStateProvider.java b/src/main/java/net/superscary/fluxmachines/datagen/providers/models/FMBlockStateProvider.java index 1265057..518b3f7 100644 --- a/src/main/java/net/superscary/fluxmachines/datagen/providers/models/FMBlockStateProvider.java +++ b/src/main/java/net/superscary/fluxmachines/datagen/providers/models/FMBlockStateProvider.java @@ -4,7 +4,6 @@ import net.minecraft.core.Direction; import net.minecraft.data.PackOutput; import net.minecraft.data.models.blockstates.*; -import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.SlabBlock; import net.minecraft.world.level.block.StairBlock; import net.minecraft.world.level.block.WallBlock; @@ -18,8 +17,6 @@ import net.superscary.fluxmachines.core.FluxMachines; import net.superscary.fluxmachines.util.block.BlockDefinition; -import java.util.function.Supplier; - public abstract class FMBlockStateProvider extends BlockStateProvider implements IDataProvider { private static final VariantProperty Z_ROT = new VariantProperty<>("fluxmachines:z", r -> new JsonPrimitive(r.ordinal() * 90)); diff --git a/src/main/java/net/superscary/fluxmachines/datagen/providers/models/FMItemModelProvider.java b/src/main/java/net/superscary/fluxmachines/datagen/providers/models/FMItemModelProvider.java index c48c7d7..81ab609 100644 --- a/src/main/java/net/superscary/fluxmachines/datagen/providers/models/FMItemModelProvider.java +++ b/src/main/java/net/superscary/fluxmachines/datagen/providers/models/FMItemModelProvider.java @@ -5,14 +5,12 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.PackType; import net.minecraft.world.item.ArmorItem; -import net.minecraft.world.item.Item; import net.minecraft.world.item.armortrim.TrimMaterial; import net.minecraft.world.item.armortrim.TrimMaterials; import net.neoforged.neoforge.client.model.generators.ItemModelBuilder; import net.neoforged.neoforge.client.model.generators.ItemModelProvider; import net.neoforged.neoforge.client.model.generators.ModelFile; import net.neoforged.neoforge.common.data.ExistingFileHelper; -import net.neoforged.neoforge.registries.DeferredItem; import net.superscary.fluxmachines.api.data.IDataProvider; import net.superscary.fluxmachines.core.FluxMachines; import net.superscary.fluxmachines.util.block.BlockDefinition; @@ -49,17 +47,16 @@ private static ResourceLocation makeId (String id) { @Override protected void registerModels () { - handheldItem(RAW_DURACITE.asItem()); - handheldItem(DURACITE_DUST.asItem()); - handheldItem(DURACITE_INGOT.asItem()); - handheldItem(DURACITE_NUGGET.asItem()); - handheldItem(DURACITE_SWORD.asItem()); - handheldItem(DURACITE_PICKAXE.asItem()); - handheldItem(DURACITE_SHOVEL.asItem()); - handheldItem(DURACITE_AXE.asItem()); - handheldItem(DURACITE_HOE.asItem()); - handheldItem(DURACITE_PAXEL.asItem()); - handheldItem(DURACITE_HAMMER.asItem()); + handheldItem(STEEL_DUST.asItem()); + handheldItem(STEEL_INGOT.asItem()); + handheldItem(STEEL_NUGGET.asItem()); + handheldItem(STEEL_SWORD.asItem()); + handheldItem(STEEL_PICKAXE.asItem()); + handheldItem(STEEL_SHOVEL.asItem()); + handheldItem(STEEL_AXE.asItem()); + handheldItem(STEEL_HOE.asItem()); + handheldItem(STEEL_PAXEL.asItem()); + handheldItem(STEEL_HAMMER.asItem()); handheldItem(WRENCH.asItem()); basicItem(HONEY_BUN.asItem()); @@ -67,10 +64,10 @@ protected void registerModels () { blockOff(FLUX_FURNACE); - trimmedArmorItem(DURACITE_HELMET); - trimmedArmorItem(DURACITE_CHESTPLATE); - trimmedArmorItem(DURACITE_LEGGINGS); - trimmedArmorItem(DURACITE_BOOTS); + trimmedArmorItem(STEEL_HELMET); + trimmedArmorItem(STEEL_CHESTPLATE); + trimmedArmorItem(STEEL_LEGGINGS); + trimmedArmorItem(STEEL_BOOTS); } diff --git a/src/main/java/net/superscary/fluxmachines/datagen/providers/recipes/BlastingRecipes.java b/src/main/java/net/superscary/fluxmachines/datagen/providers/recipes/BlastingRecipes.java index 806961e..0681b27 100644 --- a/src/main/java/net/superscary/fluxmachines/datagen/providers/recipes/BlastingRecipes.java +++ b/src/main/java/net/superscary/fluxmachines/datagen/providers/recipes/BlastingRecipes.java @@ -13,10 +13,7 @@ import java.util.concurrent.CompletableFuture; -import static net.superscary.fluxmachines.registries.FMBlocks.*; -import static net.superscary.fluxmachines.registries.FMBlocks.DURACITE_DEEPSLATE_ORE; -import static net.superscary.fluxmachines.registries.FMItems.DURACITE_DUST; -import static net.superscary.fluxmachines.registries.FMItems.RAW_DURACITE; +import static net.superscary.fluxmachines.registries.FMItems.STEEL_DUST; public class BlastingRecipes extends FMRecipeProvider { @@ -28,40 +25,15 @@ public BlastingRecipes (PackOutput packOutput, CompletableFuture HARVESTED_BLOCKS = new HashSet<>(); - - @SubscribeEvent - public static void onHammerUsage (BlockEvent.BreakEvent event) { - Player player = event.getPlayer(); - ItemStack mainHandItem = player.getMainHandItem(); - - if (mainHandItem.getItem() instanceof DuraciteTool.Hammer hammer && player instanceof ServerPlayer serverPlayer) { - BlockPos initialBlockPos = event.getPos(); - if (HARVESTED_BLOCKS.contains(initialBlockPos)) { - return; - } - - for (BlockPos pos : DuraciteTool.Hammer.getBlocksToBeDestroyed(1, initialBlockPos, serverPlayer)) { - if (pos == initialBlockPos || !hammer.isCorrectToolForDrops(mainHandItem, event.getLevel().getBlockState(pos))) { - continue; - } - - HARVESTED_BLOCKS.add(pos); - serverPlayer.gameMode.destroyBlock(pos); - HARVESTED_BLOCKS.remove(pos); - } - - } - } - -} diff --git a/src/main/java/net/superscary/fluxmachines/hook/HammerHook.java b/src/main/java/net/superscary/fluxmachines/hook/HammerHook.java new file mode 100644 index 0000000..a955cfe --- /dev/null +++ b/src/main/java/net/superscary/fluxmachines/hook/HammerHook.java @@ -0,0 +1,58 @@ +package net.superscary.fluxmachines.hook; + +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.neoforged.neoforge.event.level.BlockEvent; +import net.superscary.fluxmachines.item.tool.SteelTool; +import net.superscary.fluxmachines.util.tags.FMTag; + +import java.util.HashSet; +import java.util.Set; + +public class HammerHook { + + // thanks CoFH + private static final Set HARVESTED_BLOCKS = new HashSet<>(); + private static final ThreadLocal IS_BREAKING = new ThreadLocal<>(); + + public HammerHook () { + + } + + public static boolean isBreaking () { + return Boolean.TRUE.equals(IS_BREAKING.get()); + } + + public static void onPlayerUseBlockEvent (BlockEvent.BreakEvent event) { + onPlayerUseBlock(event.getPlayer(), event.getPlayer().level(), event.getPlayer().getMainHandItem(), event.getPos()); + } + + public static void onPlayerUseBlock (Player player, Level level, ItemStack heldItem, BlockPos blockPos) { + if (heldItem.is(FMTag.Items.HAMMER) && player instanceof ServerPlayer serverPlayer) { + var hammer = (SteelTool.Hammer) heldItem.getItem(); + try { + if (HARVESTED_BLOCKS.contains(blockPos)) { + return; + } + + for (BlockPos pos : SteelTool.Hammer.getBlocksToBeDestroyed(1, blockPos, serverPlayer)) { + IS_BREAKING.set(Boolean.TRUE); + if (pos == blockPos || !hammer.isCorrectToolForDrops(heldItem, level.getBlockState(pos))) { + continue; + } + + HARVESTED_BLOCKS.add(pos); + serverPlayer.gameMode.destroyBlock(pos); + HARVESTED_BLOCKS.remove(pos); + IS_BREAKING.set(Boolean.FALSE); + } + } finally { + IS_BREAKING.remove(); + } + } + } + +} diff --git a/src/main/java/net/superscary/fluxmachines/hook/WrenchHook.java b/src/main/java/net/superscary/fluxmachines/hook/WrenchHook.java index b1f62d4..40abc2e 100644 --- a/src/main/java/net/superscary/fluxmachines/hook/WrenchHook.java +++ b/src/main/java/net/superscary/fluxmachines/hook/WrenchHook.java @@ -11,7 +11,7 @@ import net.minecraft.world.phys.BlockHitResult; import net.neoforged.neoforge.event.entity.player.PlayerInteractEvent; import net.superscary.fluxmachines.blockentity.base.FMBaseBlockEntity; -import net.superscary.fluxmachines.item.tool.Wrench; +import net.superscary.fluxmachines.util.helper.ItemHelper; import net.superscary.fluxmachines.util.tags.FMTag; public class WrenchHook { @@ -49,8 +49,7 @@ public static InteractionResult onPlayerUseBlock (Player player, Level level, In SoundEvent sound = SoundEvents.ANVIL_HIT; level.playSound(player, hitResult.getBlockPos(), sound, SoundSource.BLOCKS, 0.7f, 1.0f); if (itemStack.is(FMTag.Items.WRENCH)) { - var item = (Wrench) itemStack.getItem(); - item.setDamage(itemStack, item.getDamage(itemStack) + 1); + ItemHelper.damageStack(itemStack); } } return result; diff --git a/src/main/java/net/superscary/fluxmachines/impl/top/FMTopPlugin.java b/src/main/java/net/superscary/fluxmachines/impl/top/FMTopPlugin.java index 1d70ce6..ade9552 100644 --- a/src/main/java/net/superscary/fluxmachines/impl/top/FMTopPlugin.java +++ b/src/main/java/net/superscary/fluxmachines/impl/top/FMTopPlugin.java @@ -1,24 +1,7 @@ package net.superscary.fluxmachines.impl.top; -import mcjty.theoneprobe.api.*; -import net.minecraft.network.chat.Component; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.state.BlockState; import net.neoforged.fml.InterModComms; import net.neoforged.fml.ModList; -import net.neoforged.neoforge.items.ItemStackHandler; -import net.superscary.fluxmachines.block.base.FMBaseEntityBlock; -import net.superscary.fluxmachines.blockentity.base.FMBaseBlockEntity; -import net.superscary.fluxmachines.blockentity.base.FMBasePoweredBlockEntity; -import net.superscary.fluxmachines.blockentity.machine.FluxFurnaceBlockEntity; -import net.superscary.fluxmachines.core.FluxMachines; -import net.superscary.fluxmachines.util.helper.MathHelper; - -import java.util.function.Function; public class FMTopPlugin { @@ -29,64 +12,4 @@ public static void register () { InterModComms.sendTo("theoneprobe", "getTheOneProbe", GetTheOneProbe::new); } - public static class GetTheOneProbe implements Function { - - public static ITheOneProbe probe; - - @Override - public Void apply (ITheOneProbe theOneProbe) { - probe = theOneProbe; - probe.registerProvider(new IProbeInfoProvider() { - @Override - public ResourceLocation getID () { - return FluxMachines.getResource("top"); - } - - @Override - public void addProbeInfo (ProbeMode mode, IProbeInfo info, Player player, Level level, BlockState blockState, IProbeHitData hitData) { - if (blockState.getBlock() instanceof FMBaseEntityBlock block) { - var type = block.getBlockEntityType(); - if (type.getBlockEntity(level, hitData.getPos()) instanceof FMBaseBlockEntity entity) { - inventoryType(mode, info, player, level, blockState, hitData, entity); - } - if (type.getBlockEntity(level, hitData.getPos()) instanceof FMBasePoweredBlockEntity entity) { - poweredType(mode, info, player, level, blockState, hitData, entity); - } - } - } - }); - return null; - } - - public void inventoryType (ProbeMode mode, IProbeInfo info, Player player, Level level, BlockState blockState, IProbeHitData hitData, FMBaseBlockEntity entity) { - ILayoutStyle defaultStyle = info.defaultLayoutStyle(); - } - - public void poweredType (ProbeMode mode, IProbeInfo info, Player player, Level level, BlockState blockState, IProbeHitData hitData, FMBasePoweredBlockEntity entity) { - ILayoutStyle defaultStyle = info.defaultLayoutStyle(); - ILayoutStyle selectedStyle = info.defaultLayoutStyle().copy().borderColor(Color.rgb(255, 255, 255)); - IProgressStyle style = info.defaultProgressStyle().copy().prefix(Component.translatable("gui.fluxmachines.progress")).suffix("%").filledColor(Color.rgb(0, 162, 0)).alternateFilledColor(Color.rgb(0, 162, 0)) - .alignment(ElementAlignment.ALIGN_CENTER).height(16); - if (entity instanceof FluxFurnaceBlockEntity flux) { - if (flux.isCrafting()) { - var result = flux.getCurrentRecipe().get().value().getResultItem(null).getItem(); - info.horizontal().item(getOrEmpty(flux.getInventory(), 0)).progress(MathHelper.percentage((int) flux.getProgress(), flux.getMaxProgress()), 100, style).item(recipeOrStack(flux.getInventory(), 1, result)); - } else { - info.text(Component.translatable("gui.fluxmachines.idle")); - } - } - } - - private ItemStack recipeOrStack (ItemStackHandler handler, int slot, Item item) { - if (handler.getStackInSlot(slot).isEmpty()) { - return new ItemStack(item); - } else return handler.getStackInSlot(slot); - } - - private ItemStack getOrEmpty (ItemStackHandler handler, int slot) { - return !handler.getStackInSlot(slot).isEmpty() ? handler.getStackInSlot(slot) : ItemStack.EMPTY; - } - - } - } diff --git a/src/main/java/net/superscary/fluxmachines/impl/top/GetTheOneProbe.java b/src/main/java/net/superscary/fluxmachines/impl/top/GetTheOneProbe.java new file mode 100644 index 0000000..cc9a7ba --- /dev/null +++ b/src/main/java/net/superscary/fluxmachines/impl/top/GetTheOneProbe.java @@ -0,0 +1,81 @@ +package net.superscary.fluxmachines.impl.top; + +import mcjty.theoneprobe.api.*; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; +import net.neoforged.neoforge.items.ItemStackHandler; +import net.superscary.fluxmachines.api.blockentity.Crafter; +import net.superscary.fluxmachines.api.inventory.InventoryHolder; +import net.superscary.fluxmachines.block.base.FMBaseEntityBlock; +import net.superscary.fluxmachines.blockentity.base.FMBaseBlockEntity; +import net.superscary.fluxmachines.blockentity.base.FMBasePoweredBlockEntity; +import net.superscary.fluxmachines.core.FluxMachines; +import net.superscary.fluxmachines.util.helper.MathHelper; + +import java.util.function.Function; + +public class GetTheOneProbe implements Function { + + public static ITheOneProbe probe; + + @Override + public Void apply (ITheOneProbe theOneProbe) { + probe = theOneProbe; + probe.registerProvider(new IProbeInfoProvider() { + @Override + public ResourceLocation getID () { + return FluxMachines.getResource("top"); + } + + @Override + public void addProbeInfo (ProbeMode mode, IProbeInfo info, Player player, Level level, BlockState blockState, IProbeHitData hitData) { + if (blockState.getBlock() instanceof FMBaseEntityBlock block) { + var type = block.getBlockEntityType(); + if (type.getBlockEntity(level, hitData.getPos()) instanceof FMBaseBlockEntity entity) { + inventoryType(mode, info, player, level, blockState, hitData, entity); + } + if (type.getBlockEntity(level, hitData.getPos()) instanceof FMBasePoweredBlockEntity entity) { + poweredType(mode, info, player, level, blockState, hitData, entity); + } + } + } + }); + return null; + } + + public void inventoryType (ProbeMode mode, IProbeInfo info, Player player, Level level, BlockState blockState, IProbeHitData hitData, FMBaseBlockEntity entity) { + ILayoutStyle defaultStyle = info.defaultLayoutStyle(); + } + + public void poweredType (ProbeMode mode, IProbeInfo info, Player player, Level level, BlockState blockState, IProbeHitData hitData, FMBasePoweredBlockEntity entity) { + IProgressStyle style = info.defaultProgressStyle().copy().prefix(Component.translatable("gui.fluxmachines.progress")).suffix("%").filledColor(Color.rgb(0, 162, 0)).alternateFilledColor(Color.rgb(0, 162, 0)) + .alignment(ElementAlignment.ALIGN_CENTER).height(16); + + if (entity instanceof Crafter crafter) { + var inventory = (InventoryHolder) entity; + if (crafter.isCrafting()) { + var result = crafter.getCurrentRecipe().get().value().getResultItem(null).getItem(); + info.horizontal().item(getOrEmpty(inventory.getInventory(), 0)).progress(MathHelper.percentage((int) crafter.getProgress(), crafter.getMaxProgress()), 100, style).item(recipeOrStack(inventory.getInventory(), 1, result)); + } else { + info.text(Component.translatable("gui.fluxmachines.idle")); + } + } + + } + + private ItemStack recipeOrStack (ItemStackHandler handler, int slot, Item item) { + if (handler.getStackInSlot(slot).isEmpty()) { + return new ItemStack(item); + } else return handler.getStackInSlot(slot); + } + + private ItemStack getOrEmpty (ItemStackHandler handler, int slot) { + return !handler.getStackInSlot(slot).isEmpty() ? handler.getStackInSlot(slot) : ItemStack.EMPTY; + } + +} diff --git a/src/main/java/net/superscary/fluxmachines/item/base/DuraciteArmorItem.java b/src/main/java/net/superscary/fluxmachines/item/base/SteelArmorItem.java similarity index 87% rename from src/main/java/net/superscary/fluxmachines/item/base/DuraciteArmorItem.java rename to src/main/java/net/superscary/fluxmachines/item/base/SteelArmorItem.java index a83fef2..02d1dab 100644 --- a/src/main/java/net/superscary/fluxmachines/item/base/DuraciteArmorItem.java +++ b/src/main/java/net/superscary/fluxmachines/item/base/SteelArmorItem.java @@ -18,16 +18,16 @@ import java.util.List; import java.util.Map; -public class DuraciteArmorItem extends ArmorItem { +public class SteelArmorItem extends ArmorItem { private static final Map, List> MATERIAL_TO_EFFECT_MAP = (new ImmutableMap.Builder, List>()) - .put(FMArmorMaterials.DURACITE, + .put(FMArmorMaterials.STEEL, List.of(new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 36_000, 1, false, false))) .build(); - public DuraciteArmorItem (ArmorTypes armorTypes) { - super(FMArmorMaterials.DURACITE, armorTypes.getType(), armorTypes.getProperties()); + public SteelArmorItem (ArmorTypes armorTypes) { + super(FMArmorMaterials.STEEL, armorTypes.getType(), armorTypes.getProperties()); } @Override @@ -95,26 +95,26 @@ private boolean hasFullSuitOfArmorOn (Player player) { return !boots.isEmpty() && !leggings.isEmpty() && !chestplate.isEmpty() && !helmet.isEmpty(); } - public static class DuraciteHelmet extends DuraciteArmorItem { - public DuraciteHelmet (Properties properties) { + public static class SteelHelmet extends SteelArmorItem { + public SteelHelmet (Properties properties) { super(ArmorTypes.HELMET); } } - public static class DuraciteChestplate extends DuraciteArmorItem { - public DuraciteChestplate (Properties properties) { + public static class SteelChestplate extends SteelArmorItem { + public SteelChestplate (Properties properties) { super(ArmorTypes.CHESTPLATE); } } - public static class DuraciteLeggings extends DuraciteArmorItem { - public DuraciteLeggings (Properties properties) { + public static class SteelLeggings extends SteelArmorItem { + public SteelLeggings (Properties properties) { super(ArmorTypes.LEGGINGS); } } - public static class DuraciteBoots extends DuraciteArmorItem { - public DuraciteBoots (Properties properties) { + public static class SteelBoots extends SteelArmorItem { + public SteelBoots (Properties properties) { super(ArmorTypes.BOOTS); } } diff --git a/src/main/java/net/superscary/fluxmachines/item/material/FMArmorMaterials.java b/src/main/java/net/superscary/fluxmachines/item/material/FMArmorMaterials.java index 32b8ab7..ac9588e 100644 --- a/src/main/java/net/superscary/fluxmachines/item/material/FMArmorMaterials.java +++ b/src/main/java/net/superscary/fluxmachines/item/material/FMArmorMaterials.java @@ -18,14 +18,14 @@ public class FMArmorMaterials { public static final DeferredRegister REGISTRY = DeferredRegister.create(Registries.ARMOR_MATERIAL, FluxMachines.MODID); - public static final Holder DURACITE = REGISTRY.register("duracite", () -> new ArmorMaterial( + public static final Holder STEEL = REGISTRY.register("steel", () -> new ArmorMaterial( Util.make(new EnumMap<>(ArmorItem.Type.class), map -> { map.put(ArmorItem.Type.BOOTS, 2); map.put(ArmorItem.Type.LEGGINGS, 5); map.put(ArmorItem.Type.CHESTPLATE, 7); map.put(ArmorItem.Type.HELMET, 2); //map.put(ArmorItem.Type.BODY, 4); im guessing this is the shield? - }), 10, SoundEvents.ARMOR_EQUIP_IRON, () -> Ingredient.of(FMItems.DURACITE_INGOT), - List.of(new ArmorMaterial.Layer(FluxMachines.getResource("duracite"))), 0.5f, .05f)); + }), 10, SoundEvents.ARMOR_EQUIP_IRON, () -> Ingredient.of(FMItems.STEEL_INGOT), + List.of(new ArmorMaterial.Layer(FluxMachines.getResource("steel"))), 0.5f, .05f)); } diff --git a/src/main/java/net/superscary/fluxmachines/item/tool/DuraciteTool.java b/src/main/java/net/superscary/fluxmachines/item/tool/SteelTool.java similarity index 92% rename from src/main/java/net/superscary/fluxmachines/item/tool/DuraciteTool.java rename to src/main/java/net/superscary/fluxmachines/item/tool/SteelTool.java index 08d5971..6e1018a 100644 --- a/src/main/java/net/superscary/fluxmachines/item/tool/DuraciteTool.java +++ b/src/main/java/net/superscary/fluxmachines/item/tool/SteelTool.java @@ -10,7 +10,6 @@ import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.tags.BlockTags; -import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.effect.MobEffect; @@ -45,15 +44,15 @@ import java.util.Map; import java.util.Optional; -public class DuraciteTool extends BaseItem { +public class SteelTool extends BaseItem { /** * Stronger but heavier than iron ref {@link Tiers#IRON} * Attack +1 | Speed -0.3F */ - public static final Tier DURACITE = new SimpleTier(BlockTags.INCORRECT_FOR_IRON_TOOL, 675, 6f, 2f, 16, () -> Ingredient.of(FMItems.DURACITE_INGOT)); + public static final Tier STEEL = new SimpleTier(BlockTags.INCORRECT_FOR_IRON_TOOL, 675, 6f, 2f, 16, () -> Ingredient.of(FMItems.STEEL_INGOT)); - public DuraciteTool (Properties properties) { + public SteelTool (Properties properties) { super(properties); } @@ -62,7 +61,7 @@ public DuraciteTool (Properties properties) { */ public static class Sword extends SwordItem { public Sword (Properties properties) { - super(DURACITE, properties.attributes(SwordItem.createAttributes(DURACITE, 4, -2.7f))); + super(STEEL, properties.attributes(SwordItem.createAttributes(STEEL, 4, -2.7f))); } } @@ -71,7 +70,7 @@ public Sword (Properties properties) { */ public static class Pickaxe extends PickaxeItem { public Pickaxe (Properties properties) { - super(DURACITE, properties.attributes(PickaxeItem.createAttributes(DURACITE, 2, -3.1f))); + super(STEEL, properties.attributes(PickaxeItem.createAttributes(STEEL, 2, -3.1f))); } } @@ -80,7 +79,7 @@ public Pickaxe (Properties properties) { */ public static class Shovel extends ShovelItem { public Shovel (Properties properties) { - super(DURACITE, properties.attributes(ShovelItem.createAttributes(DURACITE, 2.5f, -3.3f))); + super(STEEL, properties.attributes(ShovelItem.createAttributes(STEEL, 2.5f, -3.3f))); } } @@ -89,7 +88,7 @@ public Shovel (Properties properties) { */ public static class Axe extends AxeItem { public Axe (Properties properties) { - super(DURACITE, properties.attributes(AxeItem.createAttributes(DURACITE, 7, -3.4f))); + super(STEEL, properties.attributes(AxeItem.createAttributes(STEEL, 7, -3.4f))); } } @@ -98,7 +97,7 @@ public Axe (Properties properties) { */ public static class Hoe extends HoeItem { public Hoe (Properties properties) { - super(DURACITE, properties.attributes(HoeItem.createAttributes(DURACITE, -1, -1.3f))); + super(STEEL, properties.attributes(HoeItem.createAttributes(STEEL, -1, -1.3f))); } } @@ -112,7 +111,7 @@ public static class Paxel extends DiggerItem { protected static final Map FLATTENABLES; public Paxel (Properties properties) { - super(DURACITE, FMTag.Blocks.PAXEL_MINEABLE, properties.attributes(DiggerItem.createAttributes(DURACITE, 7, -2.9f))); + super(STEEL, FMTag.Blocks.PAXEL_MINEABLE, properties.attributes(DiggerItem.createAttributes(STEEL, 7, -2.9f))); } public @NotNull InteractionResult useOn (UseOnContext context) { @@ -224,7 +223,7 @@ public static class Hammer extends DiggerItem { protected final Holder effect; public Hammer (Properties properties) { - super(DURACITE, BlockTags.MINEABLE_WITH_PICKAXE, properties.attributes(PickaxeItem.createAttributes(DURACITE, 7, -3.4f))); + super(STEEL, BlockTags.MINEABLE_WITH_PICKAXE, properties.attributes(PickaxeItem.createAttributes(STEEL, 7, -3.4f))); this.effect = MobEffects.MOVEMENT_SLOWDOWN; } diff --git a/src/main/java/net/superscary/fluxmachines/registries/FMBlocks.java b/src/main/java/net/superscary/fluxmachines/registries/FMBlocks.java index d3590b2..f4b2538 100644 --- a/src/main/java/net/superscary/fluxmachines/registries/FMBlocks.java +++ b/src/main/java/net/superscary/fluxmachines/registries/FMBlocks.java @@ -1,18 +1,13 @@ package net.superscary.fluxmachines.registries; import net.minecraft.resources.ResourceLocation; -import net.minecraft.util.valueproviders.UniformInt; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.DropExperienceBlock; import net.neoforged.neoforge.registries.DeferredRegister; import net.superscary.fluxmachines.block.base.BaseBlock; import net.superscary.fluxmachines.block.base.DecorativeBlock; -import net.superscary.fluxmachines.block.base.TransparentBaseBlock; import net.superscary.fluxmachines.block.machine.FluxFurnaceBlock; -import net.superscary.fluxmachines.block.machine.MachineCasingBlock; import net.superscary.fluxmachines.core.FluxMachines; import net.superscary.fluxmachines.core.Tab; import net.superscary.fluxmachines.item.base.BaseBlockItem; @@ -32,11 +27,7 @@ public class FMBlocks { public static final List> BLOCKS = new ArrayList<>(); - public static final BlockDefinition DURACITE_ORE = reg("duracite_ore", () -> new DropExperienceBlock(UniformInt.of(3, 6), Blocks.IRON_ORE.properties().requiresCorrectToolForDrops())); - public static final BlockDefinition DURACITE_DEEPSLATE_ORE = reg("duracite_deepslate_ore", () -> new DropExperienceBlock(UniformInt.of(3, 6), Blocks.DEEPSLATE_IRON_ORE.properties().requiresCorrectToolForDrops())); - public static final BlockDefinition DURACITE_NETHER_ORE = reg("duracite_nether_ore", () -> new DropExperienceBlock(UniformInt.of(3, 6), Blocks.NETHER_GOLD_ORE.properties().requiresCorrectToolForDrops())); - public static final BlockDefinition DURACITE_BLOCK_RAW = reg("duracite_block_raw", DecorativeBlock::new); - public static final BlockDefinition DURACITE_BLOCK = reg("duracite_block", DecorativeBlock::new); + public static final BlockDefinition STEEL_BLOCK = reg("steel_block", DecorativeBlock::new); public static final BlockDefinition MACHINE_CASING = reg("machine_casing", DecorativeBlock::new); public static final BlockDefinition FLUX_FURNACE = reg("flux_furnace", FluxFurnaceBlock::new); diff --git a/src/main/java/net/superscary/fluxmachines/registries/FMItems.java b/src/main/java/net/superscary/fluxmachines/registries/FMItems.java index ad1b04c..4a16f90 100644 --- a/src/main/java/net/superscary/fluxmachines/registries/FMItems.java +++ b/src/main/java/net/superscary/fluxmachines/registries/FMItems.java @@ -3,7 +3,6 @@ import com.google.common.base.Preconditions; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.AxeItem; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.Item; import net.neoforged.neoforge.registries.DeferredRegister; @@ -11,12 +10,12 @@ import net.superscary.fluxmachines.core.Tab; import net.superscary.fluxmachines.item.base.BaseFood; import net.superscary.fluxmachines.item.base.BaseItem; -import net.superscary.fluxmachines.item.base.DuraciteArmorItem; -import net.superscary.fluxmachines.item.tool.DuraciteTool; +import net.superscary.fluxmachines.item.tool.SteelTool; import net.superscary.fluxmachines.item.tool.Wrench; -import net.superscary.fluxmachines.util.keys.Keys; import net.superscary.fluxmachines.util.item.ItemDefinition; +import net.superscary.fluxmachines.util.keys.Keys; import org.jetbrains.annotations.Nullable; +import net.superscary.fluxmachines.item.base.SteelArmorItem; import java.util.ArrayList; import java.util.Collections; @@ -30,22 +29,21 @@ public class FMItems { private static final List> ITEMS = new ArrayList<>(); - public static final ItemDefinition RAW_DURACITE = item("duracite_raw", BaseItem::new); - public static final ItemDefinition DURACITE_DUST = item("duracite_dust", BaseItem::new); - public static final ItemDefinition DURACITE_INGOT = item("duracite_ingot", BaseItem::new); - public static final ItemDefinition DURACITE_NUGGET = item("duracite_nugget", BaseItem::new); - - public static final ItemDefinition DURACITE_HELMET = item("duracite_helmet", DuraciteArmorItem.DuraciteHelmet::new); - public static final ItemDefinition DURACITE_CHESTPLATE = item("duracite_chestplate", DuraciteArmorItem.DuraciteChestplate::new); - public static final ItemDefinition DURACITE_LEGGINGS = item("duracite_leggings", DuraciteArmorItem.DuraciteLeggings::new); - public static final ItemDefinition DURACITE_BOOTS = item("duracite_boots", DuraciteArmorItem.DuraciteBoots::new); - public static final ItemDefinition DURACITE_SWORD = item("duracite_sword", DuraciteTool.Sword::new); - public static final ItemDefinition DURACITE_PICKAXE = item("duracite_pickaxe", DuraciteTool.Pickaxe::new); - public static final ItemDefinition DURACITE_AXE = item("duracite_axe", DuraciteTool.Axe::new); - public static final ItemDefinition DURACITE_SHOVEL = item("duracite_shovel", DuraciteTool.Shovel::new); - public static final ItemDefinition DURACITE_HOE = item("duracite_hoe", DuraciteTool.Hoe::new); - public static final ItemDefinition DURACITE_PAXEL = item("duracite_paxel", DuraciteTool.Paxel::new); - public static final ItemDefinition DURACITE_HAMMER = item("duracite_hammer", DuraciteTool.Hammer::new); + public static final ItemDefinition STEEL_DUST = item("steel_dust", BaseItem::new); + public static final ItemDefinition STEEL_INGOT = item("steel_ingot", BaseItem::new); + public static final ItemDefinition STEEL_NUGGET = item("steel_nugget", BaseItem::new); + + public static final ItemDefinition STEEL_HELMET = item("steel_helmet", SteelArmorItem.SteelHelmet::new); + public static final ItemDefinition STEEL_CHESTPLATE = item("steel_chestplate", SteelArmorItem.SteelChestplate::new); + public static final ItemDefinition STEEL_LEGGINGS = item("steel_leggings", SteelArmorItem.SteelLeggings::new); + public static final ItemDefinition STEEL_BOOTS = item("steel_boots", SteelArmorItem.SteelBoots::new); + public static final ItemDefinition STEEL_SWORD = item("steel_sword", SteelTool.Sword::new); + public static final ItemDefinition STEEL_PICKAXE = item("steel_pickaxe", SteelTool.Pickaxe::new); + public static final ItemDefinition STEEL_AXE = item("steel_axe", SteelTool.Axe::new); + public static final ItemDefinition STEEL_SHOVEL = item("steel_shovel", SteelTool.Shovel::new); + public static final ItemDefinition STEEL_HOE = item("steel_hoe", SteelTool.Hoe::new); + public static final ItemDefinition STEEL_PAXEL = item("steel_paxel", SteelTool.Paxel::new); + public static final ItemDefinition STEEL_HAMMER = item("steel_hammer", SteelTool.Hammer::new); public static final ItemDefinition WRENCH = item("wrench", Wrench::new); diff --git a/src/main/java/net/superscary/fluxmachines/util/helper/ItemHelper.java b/src/main/java/net/superscary/fluxmachines/util/helper/ItemHelper.java new file mode 100644 index 0000000..7731e54 --- /dev/null +++ b/src/main/java/net/superscary/fluxmachines/util/helper/ItemHelper.java @@ -0,0 +1,18 @@ +package net.superscary.fluxmachines.util.helper; + +import net.minecraft.world.item.ItemStack; + +public class ItemHelper { + + public static void damageStack (ItemStack stack) { + damageStack(stack, 1); + } + + public static void damageStack (ItemStack stack, int amount) { + var item = stack.getItem(); + if (item.isDamageable(stack)) { + item.setDamage(stack, item.getDamage(stack) + amount); + } + } + +} diff --git a/src/main/java/net/superscary/fluxmachines/util/tags/FMTag.java b/src/main/java/net/superscary/fluxmachines/util/tags/FMTag.java index d15aaec..9882be7 100644 --- a/src/main/java/net/superscary/fluxmachines/util/tags/FMTag.java +++ b/src/main/java/net/superscary/fluxmachines/util/tags/FMTag.java @@ -10,8 +10,10 @@ public class FMTag { public static class Blocks { - public static final TagKey INCORRECT_FOR_DURACITE_TOOL = createTag("incorrect_for_duracite_tool"); - public static final TagKey NEEDS_DURACITE_TOOL = createTag("needs_duracite_tool"); + public static final TagKey INCORRECT_FOR_STEEL_TOOL = createTag("incorrect_for_steel_tool"); + public static final TagKey NEEDS_STEEL_TOOL = createTag("needs_steel_tool"); + + public static final TagKey STEEL = createTag("steel_block"); public static final TagKey PAXEL_MINEABLE = createTag("mineable/paxel"); public static final TagKey WRENCHABLE = createTag("wrenchable"); @@ -24,6 +26,11 @@ private static TagKey createTag (String key) { public static class Items { public static final TagKey WRENCH = createTag("wrench"); + public static final TagKey HAMMER = createTag("hammer"); + + public static final TagKey STEEL = createTag("steel"); + public static final TagKey DUST = createTag("dust"); + public static final TagKey NUGGET = createTag("nugget"); private static TagKey createTag (String key) { return ItemTags.create(FluxMachines.getResource(key)); diff --git a/src/main/java/net/superscary/fluxmachines/worldgen/FMBiomeModifiers.java b/src/main/java/net/superscary/fluxmachines/worldgen/FMBiomeModifiers.java index f73d9d5..00dcc89 100644 --- a/src/main/java/net/superscary/fluxmachines/worldgen/FMBiomeModifiers.java +++ b/src/main/java/net/superscary/fluxmachines/worldgen/FMBiomeModifiers.java @@ -13,20 +13,13 @@ public class FMBiomeModifiers { - public static final ResourceKey ADD_DURACITE_ORE = registerKey("add_duracite_ore"); - public static final ResourceKey ADD_DURACITE_DEEPSLATE_ORE = registerKey("add_duracite_deepslate_ore"); - public static final ResourceKey ADD_DURACITE_NETHER_ORE = registerKey("add_duracite_nether_ore"); - - public static final ResourceKey ADD_DURACITE_GEODE = registerKey("add_duracite_geode"); + public static final ResourceKey ADD_STEEL_GEODE = registerKey("add_steel_geode"); public static void bootstrap (BootstrapContext context) { var placedFeatures = context.lookup(Registries.PLACED_FEATURE); var biomes = context.lookup(Registries.BIOME); - context.register(ADD_DURACITE_ORE, new BiomeModifiers.AddFeaturesBiomeModifier(biomes.getOrThrow(BiomeTags.IS_OVERWORLD), HolderSet.direct(placedFeatures.getOrThrow(FMPlacedFeatures.DURACITE_ORE_PLACED_KEY)), GenerationStep.Decoration.UNDERGROUND_ORES)); - context.register(ADD_DURACITE_DEEPSLATE_ORE, new BiomeModifiers.AddFeaturesBiomeModifier(biomes.getOrThrow(BiomeTags.IS_OVERWORLD), HolderSet.direct(placedFeatures.getOrThrow(FMPlacedFeatures.DURACITE_DEEPSLATE_ORE_PLACED_KEY)), GenerationStep.Decoration.UNDERGROUND_ORES)); - context.register(ADD_DURACITE_NETHER_ORE, new BiomeModifiers.AddFeaturesBiomeModifier(biomes.getOrThrow(BiomeTags.IS_NETHER), HolderSet.direct(placedFeatures.getOrThrow(FMPlacedFeatures.DURACITE_NETHER_ORE_PLACED_KEY)), GenerationStep.Decoration.UNDERGROUND_ORES)); - context.register(ADD_DURACITE_GEODE, new BiomeModifiers.AddFeaturesBiomeModifier(biomes.getOrThrow(BiomeTags.IS_OVERWORLD), HolderSet.direct(placedFeatures.getOrThrow(FMPlacedFeatures.DURACITE_GEODE_PLACED_KEY)), GenerationStep.Decoration.LOCAL_MODIFICATIONS)); + context.register(ADD_STEEL_GEODE, new BiomeModifiers.AddFeaturesBiomeModifier(biomes.getOrThrow(BiomeTags.IS_OVERWORLD), HolderSet.direct(placedFeatures.getOrThrow(FMPlacedFeatures.STEEL_GEODE_PLACED_KEY)), GenerationStep.Decoration.LOCAL_MODIFICATIONS)); } private static ResourceKey registerKey (String name) { diff --git a/src/main/java/net/superscary/fluxmachines/worldgen/FMConfiguredFeatures.java b/src/main/java/net/superscary/fluxmachines/worldgen/FMConfiguredFeatures.java index fa46f66..d867e01 100644 --- a/src/main/java/net/superscary/fluxmachines/worldgen/FMConfiguredFeatures.java +++ b/src/main/java/net/superscary/fluxmachines/worldgen/FMConfiguredFeatures.java @@ -13,11 +13,7 @@ import net.minecraft.world.level.levelgen.feature.Feature; import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration; import net.minecraft.world.level.levelgen.feature.configurations.GeodeConfiguration; -import net.minecraft.world.level.levelgen.feature.configurations.OreConfiguration; import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider; -import net.minecraft.world.level.levelgen.structure.templatesystem.BlockMatchTest; -import net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest; -import net.minecraft.world.level.levelgen.structure.templatesystem.TagMatchTest; import net.superscary.fluxmachines.core.FluxMachines; import net.superscary.fluxmachines.registries.FMBlocks; @@ -25,25 +21,10 @@ public class FMConfiguredFeatures { - public static final ResourceKey> OVERWORLD_DURACITE_KEY = registerKey("duracite_ore"); - public static final ResourceKey> OVERWORLD_DURACITE_DEEPSLATE_KEY = registerKey("duracite_deepslate_ore"); - public static final ResourceKey> NETHER_DURACITE_KEY = registerKey("duracite_nether_ore"); - - public static final ResourceKey> DURACITE_GEODE_KEY = registerKey("duracite_geode"); + public static final ResourceKey> STEEL_GEODE_KEY = registerKey("steel_geode"); public static void bootstrap (BootstrapContext> context) { - RuleTest stoneReplaceables = new TagMatchTest(BlockTags.STONE_ORE_REPLACEABLES); - RuleTest deepslateReplaceables = new TagMatchTest(BlockTags.DEEPSLATE_ORE_REPLACEABLES); - RuleTest netherrackReplaceables = new BlockMatchTest(Blocks.NETHERRACK); - - List overworldDuraciteOres = List.of(OreConfiguration.target(stoneReplaceables, FMBlocks.DURACITE_ORE.block().defaultBlockState())); - List overworldDuraciteDeepslateOres = List.of(OreConfiguration.target(deepslateReplaceables, FMBlocks.DURACITE_DEEPSLATE_ORE.block().defaultBlockState())); - - register(context, OVERWORLD_DURACITE_KEY, Feature.ORE, new OreConfiguration(overworldDuraciteOres, 8)); - register(context, OVERWORLD_DURACITE_DEEPSLATE_KEY, Feature.ORE, new OreConfiguration(overworldDuraciteDeepslateOres, 8)); - register(context, NETHER_DURACITE_KEY, Feature.ORE, new OreConfiguration(netherrackReplaceables, FMBlocks.DURACITE_NETHER_ORE.block().defaultBlockState(), 6)); - - register(context, DURACITE_GEODE_KEY, Feature.GEODE, new GeodeConfiguration(new GeodeBlockSettings(BlockStateProvider.simple(Blocks.AIR), BlockStateProvider.simple(Blocks.DEEPSLATE), BlockStateProvider.simple(FMBlocks.DURACITE_DEEPSLATE_ORE.block()), BlockStateProvider.simple(FMBlocks.DURACITE_BLOCK_RAW.block()), BlockStateProvider.simple(Blocks.COBBLESTONE), List.of(FMBlocks.DURACITE_BLOCK.block().defaultBlockState()), BlockTags.FEATURES_CANNOT_REPLACE, BlockTags.GEODE_INVALID_BLOCKS), new GeodeLayerSettings(1.7d, 1.2d, 2.5d, 3.5d), new GeodeCrackSettings(0.25d, 1.5d, 1), 0.5d, 0.1d, true, UniformInt.of(3, 8), UniformInt.of(2, 6), UniformInt.of(1, 2), -18, 18, 0.075D, 1)); + register(context, STEEL_GEODE_KEY, Feature.GEODE, new GeodeConfiguration(new GeodeBlockSettings(BlockStateProvider.simple(Blocks.AIR), BlockStateProvider.simple(Blocks.DEEPSLATE), BlockStateProvider.simple(FMBlocks.STEEL_BLOCK.block()), BlockStateProvider.simple(Blocks.COBBLESTONE), BlockStateProvider.simple(Blocks.COBBLESTONE), List.of(FMBlocks.STEEL_BLOCK.block().defaultBlockState()), BlockTags.FEATURES_CANNOT_REPLACE, BlockTags.GEODE_INVALID_BLOCKS), new GeodeLayerSettings(1.7d, 1.2d, 2.5d, 3.5d), new GeodeCrackSettings(0.25d, 1.5d, 1), 0.5d, 0.1d, true, UniformInt.of(3, 8), UniformInt.of(2, 6), UniformInt.of(1, 2), -18, 18, 0.075D, 1)); } public static ResourceKey> registerKey (String name) { diff --git a/src/main/java/net/superscary/fluxmachines/worldgen/FMPlacedFeatures.java b/src/main/java/net/superscary/fluxmachines/worldgen/FMPlacedFeatures.java index 03a11dc..0c25cc2 100644 --- a/src/main/java/net/superscary/fluxmachines/worldgen/FMPlacedFeatures.java +++ b/src/main/java/net/superscary/fluxmachines/worldgen/FMPlacedFeatures.java @@ -4,8 +4,6 @@ import net.minecraft.core.HolderGetter; import net.minecraft.core.registries.Registries; import net.minecraft.data.worldgen.BootstrapContext; -import net.minecraft.data.worldgen.placement.OrePlacements; -import net.minecraft.data.worldgen.placement.PlacementUtils; import net.minecraft.resources.ResourceKey; import net.minecraft.world.level.levelgen.VerticalAnchor; import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; @@ -16,19 +14,11 @@ public class FMPlacedFeatures { - public static final ResourceKey DURACITE_ORE_PLACED_KEY = registerKey("duracite_ore_placed"); - public static final ResourceKey DURACITE_DEEPSLATE_ORE_PLACED_KEY = registerKey("duracite_deepslate_ore_placed"); - public static final ResourceKey DURACITE_NETHER_ORE_PLACED_KEY = registerKey("duracite_nether_ore_placed"); - - public static final ResourceKey DURACITE_GEODE_PLACED_KEY = registerKey("duracite_geode_placed_key"); + public static final ResourceKey STEEL_GEODE_PLACED_KEY = registerKey("steel_geode_placed_key"); public static void bootstrap (BootstrapContext context) { HolderGetter> configuredFeatures = context.lookup(Registries.CONFIGURED_FEATURE); - - register(context, DURACITE_ORE_PLACED_KEY, configuredFeatures.getOrThrow(FMConfiguredFeatures.OVERWORLD_DURACITE_KEY), OrePlacements.commonOrePlacement(90, HeightRangePlacement.uniform(VerticalAnchor.absolute(-80), VerticalAnchor.absolute(80)))); - register(context, DURACITE_DEEPSLATE_ORE_PLACED_KEY, configuredFeatures.getOrThrow(FMConfiguredFeatures.OVERWORLD_DURACITE_DEEPSLATE_KEY), OrePlacements.commonOrePlacement(30, HeightRangePlacement.uniform(VerticalAnchor.absolute(-80), VerticalAnchor.absolute(80)))); - register(context, DURACITE_NETHER_ORE_PLACED_KEY, configuredFeatures.getOrThrow(FMConfiguredFeatures.NETHER_DURACITE_KEY), OrePlacements.commonOrePlacement(12, PlacementUtils.RANGE_10_10)); - register(context, DURACITE_GEODE_PLACED_KEY, configuredFeatures.getOrThrow(FMConfiguredFeatures.DURACITE_GEODE_KEY), List.of(RarityFilter.onAverageOnceEvery(50), InSquarePlacement.spread(), HeightRangePlacement.uniform(VerticalAnchor.aboveBottom(6), VerticalAnchor.absolute(60)), BiomeFilter.biome())); + register(context, STEEL_GEODE_PLACED_KEY, configuredFeatures.getOrThrow(FMConfiguredFeatures.STEEL_GEODE_KEY), List.of(RarityFilter.onAverageOnceEvery(50), InSquarePlacement.spread(), HeightRangePlacement.uniform(VerticalAnchor.aboveBottom(6), VerticalAnchor.absolute(60)), BiomeFilter.biome())); } public static ResourceKey registerKey (String name) { diff --git a/src/main/resources/assets/fluxmachines/textures/block/duracite_block.png b/src/main/resources/assets/fluxmachines/textures/block/duracite_block.png deleted file mode 100644 index d173caa..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/block/duracite_block.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/block/duracite_block_raw.png b/src/main/resources/assets/fluxmachines/textures/block/duracite_block_raw.png deleted file mode 100644 index 4f92cf8..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/block/duracite_block_raw.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/block/duracite_deepslate_ore.png b/src/main/resources/assets/fluxmachines/textures/block/duracite_deepslate_ore.png deleted file mode 100644 index f91d19c..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/block/duracite_deepslate_ore.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/block/duracite_nether_ore.png b/src/main/resources/assets/fluxmachines/textures/block/duracite_nether_ore.png deleted file mode 100644 index ec1853c..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/block/duracite_nether_ore.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/block/duracite_ore.png b/src/main/resources/assets/fluxmachines/textures/block/duracite_ore.png deleted file mode 100644 index cd490b6..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/block/duracite_ore.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/block/steel_block.png b/src/main/resources/assets/fluxmachines/textures/block/steel_block.png new file mode 100644 index 0000000..51bdb0a Binary files /dev/null and b/src/main/resources/assets/fluxmachines/textures/block/steel_block.png differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/duracite_axe.png b/src/main/resources/assets/fluxmachines/textures/item/duracite_axe.png deleted file mode 100644 index 6acaf69..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/item/duracite_axe.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/duracite_boots.png b/src/main/resources/assets/fluxmachines/textures/item/duracite_boots.png deleted file mode 100644 index 6bdc317..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/item/duracite_boots.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/duracite_chestplate.png b/src/main/resources/assets/fluxmachines/textures/item/duracite_chestplate.png deleted file mode 100644 index c4162cf..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/item/duracite_chestplate.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/duracite_helmet.png b/src/main/resources/assets/fluxmachines/textures/item/duracite_helmet.png deleted file mode 100644 index 2b397e5..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/item/duracite_helmet.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/duracite_hoe.png b/src/main/resources/assets/fluxmachines/textures/item/duracite_hoe.png deleted file mode 100644 index 7b48414..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/item/duracite_hoe.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/duracite_ingot.png b/src/main/resources/assets/fluxmachines/textures/item/duracite_ingot.png deleted file mode 100644 index 8b2e6e3..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/item/duracite_ingot.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/duracite_leggings.png b/src/main/resources/assets/fluxmachines/textures/item/duracite_leggings.png deleted file mode 100644 index 348bda7..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/item/duracite_leggings.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/duracite_nugget.png b/src/main/resources/assets/fluxmachines/textures/item/duracite_nugget.png deleted file mode 100644 index 898fe7d..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/item/duracite_nugget.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/duracite_pickaxe.png b/src/main/resources/assets/fluxmachines/textures/item/duracite_pickaxe.png deleted file mode 100644 index 9f868b7..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/item/duracite_pickaxe.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/duracite_raw.png b/src/main/resources/assets/fluxmachines/textures/item/duracite_raw.png deleted file mode 100644 index 5ed3ff6..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/item/duracite_raw.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/duracite_shovel.png b/src/main/resources/assets/fluxmachines/textures/item/duracite_shovel.png deleted file mode 100644 index aa143a2..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/item/duracite_shovel.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/duracite_sword.png b/src/main/resources/assets/fluxmachines/textures/item/duracite_sword.png deleted file mode 100644 index 3da5199..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/item/duracite_sword.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/steel_axe.png b/src/main/resources/assets/fluxmachines/textures/item/steel_axe.png new file mode 100644 index 0000000..dbbed7b Binary files /dev/null and b/src/main/resources/assets/fluxmachines/textures/item/steel_axe.png differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/steel_boots.png b/src/main/resources/assets/fluxmachines/textures/item/steel_boots.png new file mode 100644 index 0000000..2543064 Binary files /dev/null and b/src/main/resources/assets/fluxmachines/textures/item/steel_boots.png differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/steel_chestplate.png b/src/main/resources/assets/fluxmachines/textures/item/steel_chestplate.png new file mode 100644 index 0000000..c50cf0a Binary files /dev/null and b/src/main/resources/assets/fluxmachines/textures/item/steel_chestplate.png differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/duracite_dust.png b/src/main/resources/assets/fluxmachines/textures/item/steel_dust.png similarity index 100% rename from src/main/resources/assets/fluxmachines/textures/item/duracite_dust.png rename to src/main/resources/assets/fluxmachines/textures/item/steel_dust.png diff --git a/src/main/resources/assets/fluxmachines/textures/item/duracite_hammer.png b/src/main/resources/assets/fluxmachines/textures/item/steel_hammer.png similarity index 100% rename from src/main/resources/assets/fluxmachines/textures/item/duracite_hammer.png rename to src/main/resources/assets/fluxmachines/textures/item/steel_hammer.png diff --git a/src/main/resources/assets/fluxmachines/textures/item/steel_helmet.png b/src/main/resources/assets/fluxmachines/textures/item/steel_helmet.png new file mode 100644 index 0000000..48e37bd Binary files /dev/null and b/src/main/resources/assets/fluxmachines/textures/item/steel_helmet.png differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/steel_hoe.png b/src/main/resources/assets/fluxmachines/textures/item/steel_hoe.png new file mode 100644 index 0000000..772361a Binary files /dev/null and b/src/main/resources/assets/fluxmachines/textures/item/steel_hoe.png differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/steel_ingot.png b/src/main/resources/assets/fluxmachines/textures/item/steel_ingot.png new file mode 100644 index 0000000..6f50835 Binary files /dev/null and b/src/main/resources/assets/fluxmachines/textures/item/steel_ingot.png differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/steel_leggings.png b/src/main/resources/assets/fluxmachines/textures/item/steel_leggings.png new file mode 100644 index 0000000..a964eb6 Binary files /dev/null and b/src/main/resources/assets/fluxmachines/textures/item/steel_leggings.png differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/steel_nugget.png b/src/main/resources/assets/fluxmachines/textures/item/steel_nugget.png new file mode 100644 index 0000000..9b8324d Binary files /dev/null and b/src/main/resources/assets/fluxmachines/textures/item/steel_nugget.png differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/duracite_paxel.png b/src/main/resources/assets/fluxmachines/textures/item/steel_paxel.png similarity index 100% rename from src/main/resources/assets/fluxmachines/textures/item/duracite_paxel.png rename to src/main/resources/assets/fluxmachines/textures/item/steel_paxel.png diff --git a/src/main/resources/assets/fluxmachines/textures/item/steel_pickaxe.png b/src/main/resources/assets/fluxmachines/textures/item/steel_pickaxe.png new file mode 100644 index 0000000..35195e0 Binary files /dev/null and b/src/main/resources/assets/fluxmachines/textures/item/steel_pickaxe.png differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/steel_shovel.png b/src/main/resources/assets/fluxmachines/textures/item/steel_shovel.png new file mode 100644 index 0000000..4ada734 Binary files /dev/null and b/src/main/resources/assets/fluxmachines/textures/item/steel_shovel.png differ diff --git a/src/main/resources/assets/fluxmachines/textures/item/steel_sword.png b/src/main/resources/assets/fluxmachines/textures/item/steel_sword.png new file mode 100644 index 0000000..cbf285e Binary files /dev/null and b/src/main/resources/assets/fluxmachines/textures/item/steel_sword.png differ diff --git a/src/main/resources/assets/fluxmachines/textures/models/armor/duracite_layer_1.png b/src/main/resources/assets/fluxmachines/textures/models/armor/duracite_layer_1.png deleted file mode 100644 index d1f4775..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/models/armor/duracite_layer_1.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/models/armor/duracite_layer_2.png b/src/main/resources/assets/fluxmachines/textures/models/armor/duracite_layer_2.png deleted file mode 100644 index 8401d09..0000000 Binary files a/src/main/resources/assets/fluxmachines/textures/models/armor/duracite_layer_2.png and /dev/null differ diff --git a/src/main/resources/assets/fluxmachines/textures/models/armor/steel_layer_1.png b/src/main/resources/assets/fluxmachines/textures/models/armor/steel_layer_1.png new file mode 100644 index 0000000..9cac4cb Binary files /dev/null and b/src/main/resources/assets/fluxmachines/textures/models/armor/steel_layer_1.png differ diff --git a/src/main/resources/assets/fluxmachines/textures/models/armor/steel_layer_2.png b/src/main/resources/assets/fluxmachines/textures/models/armor/steel_layer_2.png new file mode 100644 index 0000000..0b5b8ed Binary files /dev/null and b/src/main/resources/assets/fluxmachines/textures/models/armor/steel_layer_2.png differ