diff --git a/astromine-core/src/datagen/java/com/github/chainmailstudios/astromine/datagen/generator/recipe/set/MultiBlastingSetRecipeGenerator.java b/astromine-core/src/datagen/java/com/github/chainmailstudios/astromine/datagen/generator/recipe/set/MultiBlastingSetRecipeGenerator.java new file mode 100644 index 000000000..0b6fe7495 --- /dev/null +++ b/astromine-core/src/datagen/java/com/github/chainmailstudios/astromine/datagen/generator/recipe/set/MultiBlastingSetRecipeGenerator.java @@ -0,0 +1,45 @@ +package com.github.chainmailstudios.astromine.datagen.generator.recipe.set; + +import net.minecraft.advancement.criterion.ImpossibleCriterion; +import net.minecraft.data.server.recipe.CookingRecipeJsonFactory; +import net.minecraft.item.Item; +import net.minecraft.recipe.Ingredient; + +import com.github.chainmailstudios.astromine.datagen.material.MaterialItemType; +import com.github.chainmailstudios.astromine.datagen.material.MaterialSet; +import me.shedaniel.cloth.api.datagen.v1.RecipeData; + +import java.util.Arrays; +import java.util.Collection; + +public class MultiBlastingSetRecipeGenerator extends MultiCookingSetRecipeGenerator { + public MultiBlastingSetRecipeGenerator(Collection inputs, MaterialItemType output, int time, float experience) { + super(inputs, output, time, experience); + } + + public MultiBlastingSetRecipeGenerator(Collection inputs, MaterialItemType output, float experience) { + this(inputs, output, 100, experience); + } + + public MultiBlastingSetRecipeGenerator(Collection inputs, MaterialItemType output) { + this(inputs, output, 100, 0.1f); + } + + @Override + public void generate(RecipeData recipes, MaterialSet set) { + Collection items = getInputs(set); + CookingRecipeJsonFactory + .createBlasting( + Ingredient.ofItems(items.toArray(new Item[0])), + set.getItem(output), + experience, + time) + .criterion("impossible", new ImpossibleCriterion.Conditions()) + .offerTo(recipes, getRecipeId(set)); + } + + @Override + public String getRecipeName(MaterialSet set) { + return set.getItemIdPath(output) + "_from_blasting"; + } +} diff --git a/astromine-core/src/datagen/java/com/github/chainmailstudios/astromine/datagen/generator/recipe/set/MultiCookingSetRecipeGenerator.java b/astromine-core/src/datagen/java/com/github/chainmailstudios/astromine/datagen/generator/recipe/set/MultiCookingSetRecipeGenerator.java new file mode 100644 index 000000000..02e027b2a --- /dev/null +++ b/astromine-core/src/datagen/java/com/github/chainmailstudios/astromine/datagen/generator/recipe/set/MultiCookingSetRecipeGenerator.java @@ -0,0 +1,44 @@ +package com.github.chainmailstudios.astromine.datagen.generator.recipe.set; + +import net.minecraft.item.Item; + +import com.github.chainmailstudios.astromine.datagen.generator.recipe.set.base.CookingSetRecipeGenerator; +import com.github.chainmailstudios.astromine.datagen.material.MaterialItemType; +import com.github.chainmailstudios.astromine.datagen.material.MaterialSet; + +import java.util.ArrayList; +import java.util.Collection; + +public abstract class MultiCookingSetRecipeGenerator extends CookingSetRecipeGenerator { + private final Collection inputs; + + public MultiCookingSetRecipeGenerator(Collection inputs, MaterialItemType output, int time, float experience) { + super(inputs.stream().findFirst().get(), output, time, experience); + this.inputs = inputs; + } + + public Collection getInputs() { + return inputs; + } + + public Collection getInputs(MaterialSet set) { + ArrayList items = new ArrayList<>(); + for(MaterialItemType type:getInputs()) { + if(shouldGenerate(set, type)) items.add(set.getItem(type)); + } + return items; + } + + @Override + public boolean shouldGenerate(MaterialSet set) { + boolean hasInput = false; + for(MaterialItemType type:getInputs()) { + if(set.hasType(type)) hasInput = true; + } + return hasInput && set.hasType(output); + } + + public boolean shouldGenerate(MaterialSet set, MaterialItemType type) { + return set.hasType(output) && set.hasType(type) && !(set.isFromVanilla(type) && set.isFromVanilla(output)); + } +} diff --git a/astromine-core/src/datagen/java/com/github/chainmailstudios/astromine/datagen/generator/recipe/set/MultiSmeltingSetRecipeGenerator.java b/astromine-core/src/datagen/java/com/github/chainmailstudios/astromine/datagen/generator/recipe/set/MultiSmeltingSetRecipeGenerator.java new file mode 100644 index 000000000..60104fb89 --- /dev/null +++ b/astromine-core/src/datagen/java/com/github/chainmailstudios/astromine/datagen/generator/recipe/set/MultiSmeltingSetRecipeGenerator.java @@ -0,0 +1,46 @@ +package com.github.chainmailstudios.astromine.datagen.generator.recipe.set; + +import net.minecraft.advancement.criterion.ImpossibleCriterion; +import net.minecraft.data.server.recipe.CookingRecipeJsonFactory; +import net.minecraft.item.Item; +import net.minecraft.recipe.Ingredient; + +import com.github.chainmailstudios.astromine.datagen.material.MaterialItemType; +import com.github.chainmailstudios.astromine.datagen.material.MaterialSet; +import me.shedaniel.cloth.api.datagen.v1.RecipeData; + +import java.util.Arrays; +import java.util.Collection; + +public class MultiSmeltingSetRecipeGenerator extends MultiCookingSetRecipeGenerator { + + public MultiSmeltingSetRecipeGenerator(Collection inputs, MaterialItemType output, int time, float experience) { + super(inputs, output, time, experience); + } + + public MultiSmeltingSetRecipeGenerator(Collection inputs, MaterialItemType output, float experience) { + this(inputs, output, 200, experience); + } + + public MultiSmeltingSetRecipeGenerator(Collection inputs, MaterialItemType output) { + this(inputs, output, 200, 0.1f); + } + + @Override + public void generate(RecipeData recipes, MaterialSet set) { + Collection items = getInputs(set); + CookingRecipeJsonFactory + .createSmelting( + Ingredient.ofItems(items.toArray(new Item[0])), + set.getItem(output), + experience, + time) + .criterion("impossible", new ImpossibleCriterion.Conditions()) + .offerTo(recipes, getRecipeId(set)); + } + + @Override + public String getRecipeName(MaterialSet set) { + return set.getItemIdPath(output) + "_from_smelting"; + } +} diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/block/entity/base/ComponentBlockEntity.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/block/entity/base/ComponentBlockEntity.java index 6f336d4f9..880124246 100644 --- a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/block/entity/base/ComponentBlockEntity.java +++ b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/block/entity/base/ComponentBlockEntity.java @@ -24,6 +24,7 @@ package com.github.chainmailstudios.astromine.common.block.entity.base; +import nerdhub.cardinal.components.api.component.ComponentProvider; import net.fabricmc.fabric.api.block.entity.BlockEntityClientSerializable; import net.fabricmc.fabric.api.network.PacketContext; @@ -46,7 +47,6 @@ import com.github.chainmailstudios.astromine.AstromineCommon; import com.github.chainmailstudios.astromine.common.block.base.BlockWithEntity; import com.github.chainmailstudios.astromine.common.block.transfer.TransferType; -import com.github.chainmailstudios.astromine.common.component.SidedComponentProvider; import com.github.chainmailstudios.astromine.common.component.block.entity.BlockEntityTransferComponent; import com.github.chainmailstudios.astromine.common.component.inventory.FluidInventoryComponent; import com.github.chainmailstudios.astromine.common.packet.PacketConsumer; @@ -71,7 +71,7 @@ import java.util.function.BiConsumer; import java.util.stream.Collectors; -public abstract class ComponentBlockEntity extends net.minecraft.block.entity.BlockEntity implements SidedComponentProvider, PacketConsumer, BlockEntityClientSerializable, Tickable { +public abstract class ComponentBlockEntity extends net.minecraft.block.entity.BlockEntity implements ComponentProvider, PacketConsumer, BlockEntityClientSerializable, Tickable { public static final Identifier TRANSFER_UPDATE_PACKET = AstromineCommon.identifier("transfer_update_packet"); protected final BlockEntityTransferComponent transferComponent = new BlockEntityTransferComponent(); protected final Map, Component> allComponents = Maps.newHashMap(); @@ -113,21 +113,6 @@ public void consumePacket(Identifier identifier, PacketByteBuf buffer, PacketCon allHandlers.get(identifier).accept(buffer, context); } - @Override - public Collection getSidedComponents(Direction direction) { - if (direction == null) { - return (Collection) allComponents.values(); - } else { - if (getCachedState().contains(HorizontalFacingBlock.FACING)) { - return (Collection) getComponentTypes().stream().map(type -> new Pair<>((ComponentType) type, (Component) getComponent(type))).filter(pair -> !transferComponent.get(pair.getLeft()).get(direction).isNone()).map(Pair::getRight).collect(Collectors.toList()); - } else if (getCachedState().contains(FacingBlock.FACING)) { - return (Collection) getComponentTypes().stream().map(type -> new Pair<>((ComponentType) type, (Component) getComponent(type))).filter(pair -> !transferComponent.get(pair.getLeft()).get(direction).isNone()).map(Pair::getRight).collect(Collectors.toList()); - } else { - return Lists.newArrayList(); - } - } - } - @Override public boolean hasComponent(ComponentType componentType) { return allComponents.containsKey(componentType) || componentType == AstromineComponentTypes.BLOCK_ENTITY_TRANSFER_COMPONENT; @@ -194,11 +179,10 @@ public void tick() { for (Direction offsetDirection : Direction.values()) { BlockPos neighborPos = getPos().offset(offsetDirection); - BlockState neighborState = world.getBlockState(neighborPos); net.minecraft.block.entity.BlockEntity neighborBlockEntity = world.getBlockEntity(neighborPos); - if (neighborBlockEntity != null) { - SidedComponentProvider neighborProvider = SidedComponentProvider.fromBlockEntity(neighborBlockEntity); + if (neighborBlockEntity instanceof ComponentProvider) { + ComponentProvider neighborProvider = (ComponentProvider) neighborBlockEntity; Direction neighborDirection = offsetDirection.getOpposite(); BlockEntityTransferComponent neighborTransferComponent = neighborProvider != null ? neighborProvider.getComponent(AstromineComponentTypes.BLOCK_ENTITY_TRANSFER_COMPONENT) : null; diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/block/entity/base/ComponentEnergyFluidBlockEntity.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/block/entity/base/ComponentEnergyFluidBlockEntity.java index a58131867..175a8eaf4 100644 --- a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/block/entity/base/ComponentEnergyFluidBlockEntity.java +++ b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/block/entity/base/ComponentEnergyFluidBlockEntity.java @@ -29,11 +29,10 @@ import net.minecraft.block.Block; import net.minecraft.block.entity.BlockEntityType; -import com.github.chainmailstudios.astromine.common.component.SidedComponentProvider; import com.github.chainmailstudios.astromine.common.component.inventory.FluidInventoryComponent; import com.github.chainmailstudios.astromine.registry.AstromineComponentTypes; -public abstract class ComponentEnergyFluidBlockEntity extends ComponentEnergyBlockEntity implements SidedComponentProvider, BlockEntityClientSerializable { +public abstract class ComponentEnergyFluidBlockEntity extends ComponentEnergyBlockEntity { protected final FluidInventoryComponent fluidComponent = createFluidComponent(); public ComponentEnergyFluidBlockEntity(Block energyBlock, BlockEntityType type) { diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/block/entity/base/ComponentFluidBlockEntity.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/block/entity/base/ComponentFluidBlockEntity.java index f9446570b..d1c3882b0 100644 --- a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/block/entity/base/ComponentFluidBlockEntity.java +++ b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/block/entity/base/ComponentFluidBlockEntity.java @@ -28,11 +28,10 @@ import net.minecraft.block.entity.BlockEntityType; -import com.github.chainmailstudios.astromine.common.component.SidedComponentProvider; import com.github.chainmailstudios.astromine.common.component.inventory.FluidInventoryComponent; import com.github.chainmailstudios.astromine.registry.AstromineComponentTypes; -public abstract class ComponentFluidBlockEntity extends ComponentBlockEntity implements SidedComponentProvider, BlockEntityClientSerializable { +public abstract class ComponentFluidBlockEntity extends ComponentBlockEntity { protected final FluidInventoryComponent fluidComponent = createFluidComponent(); public ComponentFluidBlockEntity(BlockEntityType type) { diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/component/SidedComponentProvider.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/component/SidedComponentProvider.java deleted file mode 100644 index fc87bcfe1..000000000 --- a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/component/SidedComponentProvider.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2020 Chainmail Studios - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package com.github.chainmailstudios.astromine.common.component; - -import net.minecraft.block.entity.BlockEntity; -import net.minecraft.util.math.Direction; - -import nerdhub.cardinal.components.api.ComponentType; -import nerdhub.cardinal.components.api.component.Component; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import java.util.Collection; -import java.util.Optional; - -public interface SidedComponentProvider extends nerdhub.cardinal.components.api.component.ComponentProvider { - static SidedComponentProvider fromBlockEntity(BlockEntity blockEntity) { - return blockEntity instanceof SidedComponentProvider ? (SidedComponentProvider) blockEntity : null; - } - - Collection getSidedComponents(@Nullable Direction direction); - - default T getSidedComponent(@Nullable Direction direction, @NotNull ComponentType type) { - Optional optional = (Optional) getSidedComponents(direction).stream().filter(component -> type.getComponentClass().isInstance(component)).findFirst(); - return optional.orElse(null); - } -} diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/component/inventory/FluidInventoryComponent.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/component/inventory/FluidInventoryComponent.java index 95f650df9..e62923e66 100644 --- a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/component/inventory/FluidInventoryComponent.java +++ b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/component/inventory/FluidInventoryComponent.java @@ -98,7 +98,7 @@ default boolean canExtract(@Nullable Direction direction, FluidVolume volume, in default TypedActionResult insert(Direction direction, FluidVolume volume) { Optional> matchingVolumeOptional = this.getContents().entrySet().stream().filter(entry -> { - return canInsert(direction, entry.getValue(), entry.getKey()) && entry.getValue().canAccept(volume.getFluid()); + return canInsert(direction, volume, entry.getKey()) && entry.getValue().canAccept(volume.getFluid()); }).findFirst(); if (matchingVolumeOptional.isPresent()) { diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/lba/LibBlockAttributesCompatibility.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/lba/LibBlockAttributesCompatibility.java index 7e73aea3e..6beb9a9f2 100644 --- a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/lba/LibBlockAttributesCompatibility.java +++ b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/lba/LibBlockAttributesCompatibility.java @@ -24,6 +24,8 @@ package com.github.chainmailstudios.astromine.common.lba; +import com.github.chainmailstudios.astromine.common.component.block.entity.BlockEntityTransferComponent; +import nerdhub.cardinal.components.api.component.ComponentProvider; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; import net.minecraft.fluid.Fluid; @@ -42,7 +44,6 @@ import alexiil.mc.lib.attributes.fluid.amount.FluidAmount; import alexiil.mc.lib.attributes.fluid.volume.FluidKey; import alexiil.mc.lib.attributes.fluid.volume.FluidKeys; -import com.github.chainmailstudios.astromine.common.component.SidedComponentProvider; import com.github.chainmailstudios.astromine.common.component.inventory.FluidInventoryComponent; import com.github.chainmailstudios.astromine.common.volume.fluid.FluidVolume; import com.github.chainmailstudios.astromine.common.volume.fraction.Fraction; @@ -63,17 +64,22 @@ private static void appendAdder(Attribute attribute) { private static void append(World world, BlockPos blockPos, BlockState state, AttributeList list) { BlockEntity blockEntity = world.getBlockEntity(blockPos); - if (blockEntity != null) { - SidedComponentProvider sidedComponentProvider = SidedComponentProvider.fromBlockEntity(blockEntity); + if (blockEntity instanceof ComponentProvider) { + ComponentProvider componentProvider = (ComponentProvider) blockEntity; - if (sidedComponentProvider != null) { - @Nullable - Direction direction = list.getTargetSide(); + @Nullable + Direction direction = list.getTargetSide(); - FluidInventoryComponent component = sidedComponentProvider.getSidedComponent(direction, AstromineComponentTypes.FLUID_INVENTORY_COMPONENT); + if (direction != null) { + BlockEntityTransferComponent transferComponent = componentProvider.getComponent(AstromineComponentTypes.BLOCK_ENTITY_TRANSFER_COMPONENT); - if (component != null) { - list.offer(new LibBlockAttributesWrapper(component)); + // This does not check canInsert or canExtract; because I do not know how the hell to do that with LBA. + if (transferComponent != null && !transferComponent.get(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).get(direction).isNone()) { + FluidInventoryComponent component = componentProvider.getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT); + + if (component != null) { + list.offer(new LibBlockAttributesWrapper(component)); + } } } } diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/network/type/FluidNetworkType.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/network/type/FluidNetworkType.java index 3a2e24c6e..387a3f520 100644 --- a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/network/type/FluidNetworkType.java +++ b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/network/type/FluidNetworkType.java @@ -24,15 +24,12 @@ package com.github.chainmailstudios.astromine.common.network.type; -import net.minecraft.block.FacingBlock; -import net.minecraft.block.HorizontalFacingBlock; +import nerdhub.cardinal.components.api.component.ComponentProvider; import net.minecraft.block.entity.BlockEntity; -import net.minecraft.state.property.Property; import net.minecraft.util.Pair; import net.minecraft.util.math.Direction; import com.github.chainmailstudios.astromine.common.block.transfer.TransferType; -import com.github.chainmailstudios.astromine.common.component.SidedComponentProvider; import com.github.chainmailstudios.astromine.common.component.block.entity.BlockEntityTransferComponent; import com.github.chainmailstudios.astromine.common.component.inventory.FluidInventoryComponent; import com.github.chainmailstudios.astromine.common.network.NetworkInstance; @@ -57,20 +54,14 @@ public void tick(NetworkInstance instance) { BlockEntity blockEntity = instance.getWorld().getBlockEntity(memberNode.getBlockPos()); NetworkMember networkMember = NetworkMemberRegistry.get(blockEntity); - if (blockEntity instanceof SidedComponentProvider && networkMember.acceptsType(this)) { - SidedComponentProvider provider = SidedComponentProvider.fromBlockEntity(blockEntity); + if (blockEntity instanceof ComponentProvider && networkMember.acceptsType(this)) { + ComponentProvider provider = (ComponentProvider) blockEntity; - FluidInventoryComponent fluidComponent = provider.getSidedComponent(memberNode.getDirection(), AstromineComponentTypes.FLUID_INVENTORY_COMPONENT); + FluidInventoryComponent fluidComponent = provider.getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT); BlockEntityTransferComponent transferComponent = provider.getComponent(AstromineComponentTypes.BLOCK_ENTITY_TRANSFER_COMPONENT); - before: if (fluidComponent != null && transferComponent != null) { - Property property = blockEntity.getCachedState().contains(HorizontalFacingBlock.FACING) ? HorizontalFacingBlock.FACING : blockEntity.getCachedState().contains(FacingBlock.FACING) ? FacingBlock.FACING : null; - - if (!blockEntity.getCachedState().contains(property)) - break before; - TransferType type = transferComponent.get(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).get(memberNode.getDirection()); if (!type.isDisabled()) { diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/recipe/ingredient/FluidIngredient.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/recipe/ingredient/FluidIngredient.java new file mode 100644 index 000000000..bd6b8a449 --- /dev/null +++ b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/recipe/ingredient/FluidIngredient.java @@ -0,0 +1,219 @@ +/* + * MIT License + * + * Copyright (c) 2020 Chainmail Studios + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.chainmailstudios.astromine.common.recipe.ingredient; + +import net.minecraft.fluid.Fluid; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.network.PacketByteBuf; +import net.minecraft.recipe.Ingredient; +import net.minecraft.tag.ServerTagManagerHolder; +import net.minecraft.tag.Tag; +import net.minecraft.util.Identifier; +import net.minecraft.util.JsonHelper; +import net.minecraft.util.registry.Registry; + +import com.github.chainmailstudios.astromine.common.volume.fluid.FluidVolume; +import com.github.chainmailstudios.astromine.common.volume.fraction.Fraction; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.JsonSyntaxException; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.function.Predicate; +import java.util.stream.Stream; +import java.util.stream.StreamSupport; + +public class FluidIngredient implements Predicate { + private final Entry[] entries; + private FluidVolume[] matchingVolumes; + + private FluidIngredient(Entry... entries) { + this.entries = entries; + } + + public static FluidIngredient ofFluidVolumes(FluidVolume... volumes) { + return ofFluidVolumes(Arrays.asList(volumes)); + } + + public static FluidIngredient ofFluidVolumes(Collection volumes) { + return new FluidIngredient(new SimpleEntry(volumes)); + } + + public static FluidIngredient ofEntries(Stream volumes) { + return new FluidIngredient(volumes.toArray(Entry[]::new)); + } + + public static FluidIngredient fromJson(JsonElement json) { + if (json != null && !json.isJsonNull()) { + if (json.isJsonObject()) { + return ofEntries(Stream.of(entryFromJson(json.getAsJsonObject()))); + } else if (json.isJsonArray()) { + JsonArray jsonArray = json.getAsJsonArray(); + if (jsonArray.size() == 0) { + throw new JsonSyntaxException("Fluid array cannot be empty, at least one fluid must be defined"); + } else { + return ofEntries(StreamSupport.stream(jsonArray.spliterator(), false).map((jsonElement) -> entryFromJson(JsonHelper.asObject(jsonElement, "fluid")))); + } + } else { + throw new JsonSyntaxException("Expected fluid to be object or array of objects"); + } + } else { + throw new JsonSyntaxException("Fluid cannot be null"); + } + } + + private static Entry entryFromJson(JsonObject json) { + if (json.has("fluid") && json.has("tag")) { + throw new JsonParseException("A fluid ingredient entry is either a tag or a fluid, not both"); + } else { + int numerator = 1; + int denominator = 1; + if (json.has("amount")) { + JsonObject amount = JsonHelper.getObject(json, "amount"); + if (amount.has("numerator")) { + numerator = JsonHelper.getInt(amount, "numerator"); + } + if (amount.has("denominator")) { + denominator = JsonHelper.getInt(amount, "denominator"); + } + } + if (json.has("fluid")) { + Identifier fluidId = new Identifier(JsonHelper.getString(json, "fluid")); + Fluid fluid = Registry.FLUID.getOrEmpty(fluidId).orElseThrow(() -> new JsonSyntaxException("Unknown fluid '" + fluidId + "'")); + return new SimpleEntry(FluidVolume.of(new Fraction(numerator, denominator), fluid)); + } else if (json.has("tag")) { + Identifier tagId = new Identifier(JsonHelper.getString(json, "tag")); + Tag tag = ServerTagManagerHolder.getTagManager().getFluids().getTag(tagId); + if (tag == null) { + throw new JsonSyntaxException("Unknown fluid tag '" + tagId + "'"); + } else { + return new TagEntry(tag, numerator, denominator); + } + } else { + throw new JsonParseException("A fluid ingredient entry needs either a tag or a fluid"); + } + } + } + + public static FluidIngredient fromPacket(PacketByteBuf buffer) { + int i = buffer.readVarInt(); + return ofEntries(Stream.generate(() -> new SimpleEntry(FluidVolume.readFromBuffer(buffer))).limit(i)); + } + + public FluidVolume[] getMatchingVolumes() { + this.cacheMatchingVolumes(); + return this.matchingVolumes; + } + + private void cacheMatchingVolumes() { + if (this.matchingVolumes == null) { + this.matchingVolumes = Arrays.stream(this.entries).flatMap(Entry::getVolumes).distinct().toArray(FluidVolume[]::new); + } + } + + @Override + public boolean test(FluidVolume volume) { + return testMatching(volume) != null; + } + + public boolean test(Fluid fluid) { + FluidVolume[] matchingVolumes = getMatchingVolumes(); + if (this.matchingVolumes.length == 0) + return false; + for (FluidVolume matchingVolume : matchingVolumes) { + if(matchingVolume.getFluid().equals(fluid)) return true; + } + return false; + } + + public FluidVolume testMatching(FluidVolume volume) { + if (volume == null) + return null; + FluidVolume[] matchingVolumes = getMatchingVolumes(); + if (this.matchingVolumes.length == 0) + return null; + for (FluidVolume matchingVolume : matchingVolumes) { + if (FluidVolume.areFluidsEqual(matchingVolume, volume) && volume.getAmount().biggerOrEqualThan(matchingVolume.getAmount())) + return matchingVolume.copy(); + } + return null; + } + + public void write(PacketByteBuf buffer) { + this.cacheMatchingVolumes(); + buffer.writeVarInt(this.matchingVolumes.length); + + for (FluidVolume matchingVolume : this.matchingVolumes) { + matchingVolume.writeToBuffer(buffer); + } + } + + interface Entry { + Stream getVolumes(); + } + + private static class SimpleEntry implements Entry { + private final Collection volumes; + + public SimpleEntry(Collection volumes) { + this.volumes = volumes; + } + + public SimpleEntry(FluidVolume volume) { + this(Collections.singleton(volume)); + } + + @Override + public Stream getVolumes() { + return volumes.stream(); + } + } + + private static class TagEntry implements Entry { + private final Tag tag; + private final long numerator; + private final long denominator; + + private TagEntry(Tag tag, long numerator, long denominator) { + this.tag = tag; + this.numerator = numerator; + this.denominator = denominator; + } + + private TagEntry(Tag tag) { + this(tag, 1, 1); + } + + @Override + public Stream getVolumes() { + return this.tag.values().stream().map(fluid -> FluidVolume.of(new Fraction(numerator, denominator), fluid)); + } + } +} diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/screenhandler/base/block/ComponentBlockEntityEnergyFluidScreenHandler.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/screenhandler/base/block/ComponentBlockEntityEnergyFluidScreenHandler.java index 514b209c7..ae5aad4ef 100644 --- a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/screenhandler/base/block/ComponentBlockEntityEnergyFluidScreenHandler.java +++ b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/screenhandler/base/block/ComponentBlockEntityEnergyFluidScreenHandler.java @@ -59,7 +59,7 @@ public void initialize(int width, int height) { fluidBar = new FluidVerticalBarWidget(); fluidBar.setPosition(Position.of(energyBar, energyBar.getWidth() + 7, 0)); fluidBar.setSize(Size.of(energyBar.getWidth(), energyBar.getHeight())); - fluidBar.setVolume(() -> blockEntity.getSidedComponent(null, AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(0)); + fluidBar.setVolume(() -> blockEntity.getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(0)); mainTab.addWidget(energyBar); mainTab.addWidget(fluidBar); diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/screenhandler/base/block/ComponentBlockEntityFluidInventoryScreenHandler.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/screenhandler/base/block/ComponentBlockEntityFluidInventoryScreenHandler.java index 9d74d301c..4189f1714 100644 --- a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/screenhandler/base/block/ComponentBlockEntityFluidInventoryScreenHandler.java +++ b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/screenhandler/base/block/ComponentBlockEntityFluidInventoryScreenHandler.java @@ -52,7 +52,7 @@ public void initialize(int width, int height) { fluidBar = new FluidVerticalBarWidget(); fluidBar.setPosition(Position.of(mainTab, 7, 11)); fluidBar.setSize(Size.of(24F, 48F)); - fluidBar.setVolume(() -> blockEntity.getSidedComponent(null, AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(0)); + fluidBar.setVolume(() -> blockEntity.getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(0)); mainTab.addWidget(fluidBar); } diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/screenhandler/base/block/ComponentBlockEntityFluidScreenHandler.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/screenhandler/base/block/ComponentBlockEntityFluidScreenHandler.java index ccc87006a..bd548e34e 100644 --- a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/screenhandler/base/block/ComponentBlockEntityFluidScreenHandler.java +++ b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/screenhandler/base/block/ComponentBlockEntityFluidScreenHandler.java @@ -52,7 +52,7 @@ public void initialize(int width, int height) { fluidBar = new FluidVerticalBarWidget(); fluidBar.setPosition(Position.of(mainTab, 7, 11)); fluidBar.setSize(Size.of(24F, 48F)); - fluidBar.setVolume(() -> blockEntity.getSidedComponent(null, AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(0)); + fluidBar.setVolume(() -> blockEntity.getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(0)); mainTab.addWidget(fluidBar); } diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/screenhandler/base/block/ComponentBlockEntityScreenHandler.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/screenhandler/base/block/ComponentBlockEntityScreenHandler.java index f0b01bfa4..91e29c2ed 100644 --- a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/screenhandler/base/block/ComponentBlockEntityScreenHandler.java +++ b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/screenhandler/base/block/ComponentBlockEntityScreenHandler.java @@ -24,6 +24,7 @@ package com.github.chainmailstudios.astromine.common.screenhandler.base.block; +import nerdhub.cardinal.components.api.component.ComponentProvider; import net.minecraft.block.Block; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.screen.ScreenHandlerContext; @@ -35,7 +36,6 @@ import com.github.chainmailstudios.astromine.common.block.base.HorizontalFacingBlockWithEntity; import com.github.chainmailstudios.astromine.common.block.entity.base.ComponentBlockEntity; -import com.github.chainmailstudios.astromine.common.component.SidedComponentProvider; import com.github.chainmailstudios.astromine.common.component.block.entity.BlockEntityTransferComponent; import com.github.chainmailstudios.astromine.common.component.inventory.NameableComponent; import com.github.chainmailstudios.astromine.common.utilities.WidgetUtilities; @@ -118,8 +118,6 @@ public void initialize(int width, int height) { mainTab.addWidget(invTitle); playerSlots = Slots.addPlayerInventory(invPos, Size.of(18F, 18F), mainTab, getPlayer().inventory); - SidedComponentProvider sidedComponentProvider = SidedComponentProvider.fromBlockEntity(syncBlockEntity); - Direction rotation = Direction.NORTH; Block block = syncBlockEntity.getCachedState().getBlock(); @@ -131,11 +129,11 @@ public void initialize(int width, int height) { final Direction finalRotation = rotation; - BlockEntityTransferComponent transferComponent = sidedComponentProvider.getComponent(AstromineComponentTypes.BLOCK_ENTITY_TRANSFER_COMPONENT); + BlockEntityTransferComponent transferComponent = syncBlockEntity.getComponent(AstromineComponentTypes.BLOCK_ENTITY_TRANSFER_COMPONENT); transferComponent.get().forEach((type, entry) -> { - if (sidedComponentProvider.getComponent(type) instanceof NameableComponent) { - NameableComponent nameableComponent = (NameableComponent) sidedComponentProvider.getComponent(type); + if (syncBlockEntity.getComponent(type) instanceof NameableComponent) { + NameableComponent nameableComponent = (NameableComponent) syncBlockEntity.getComponent(type); TabWidgetCollection current = (TabWidgetCollection) tabs.addTab(nameableComponent.getSymbol(), () -> Collections.singletonList(nameableComponent.getName())); WidgetUtilities.createTransferTab(current, Position.of(tabs, tabs.getWidth() / 2 - 38, getTabWidgetExtendedHeight() / 2), finalRotation, transferComponent, syncBlockEntity.getPos(), type); TextWidget invTabTitle = new TextWidget(); diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/utilities/capability/energy/ExtendedEnergyProvider.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/utilities/capability/energy/ExtendedEnergyProvider.java index 9532ce508..db43c5145 100644 --- a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/utilities/capability/energy/ExtendedEnergyProvider.java +++ b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/utilities/capability/energy/ExtendedEnergyProvider.java @@ -24,16 +24,16 @@ package com.github.chainmailstudios.astromine.common.utilities.capability.energy; -import com.github.chainmailstudios.astromine.common.component.SidedComponentProvider; import com.github.chainmailstudios.astromine.common.component.inventory.EnergyInventoryComponent; import com.github.chainmailstudios.astromine.common.utilities.EnergyUtilities; import com.github.chainmailstudios.astromine.common.volume.handler.TransferHandler; import com.github.chainmailstudios.astromine.registry.AstromineComponentTypes; +import nerdhub.cardinal.components.api.component.ComponentProvider; import team.reborn.energy.EnergySide; import team.reborn.energy.EnergyStorage; import team.reborn.energy.EnergyTier; -public interface ExtendedEnergyProvider extends EnergyStorage, SidedComponentProvider { +public interface ExtendedEnergyProvider extends EnergyStorage, ComponentProvider { @Override default double getStored(EnergySide side) { return getEnergyComponent().getAmount(); diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/utilities/capability/inventory/ExtendedComponentSidedInventoryProvider.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/utilities/capability/inventory/ExtendedComponentSidedInventoryProvider.java index 1fc1a6d9b..c7cb27996 100644 --- a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/utilities/capability/inventory/ExtendedComponentSidedInventoryProvider.java +++ b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/utilities/capability/inventory/ExtendedComponentSidedInventoryProvider.java @@ -24,6 +24,7 @@ package com.github.chainmailstudios.astromine.common.utilities.capability.inventory; +import nerdhub.cardinal.components.api.component.ComponentProvider; import net.minecraft.block.BlockState; import net.minecraft.block.InventoryProvider; import net.minecraft.block.entity.BlockEntity; @@ -33,7 +34,6 @@ import net.minecraft.util.math.Direction; import net.minecraft.world.WorldAccess; -import com.github.chainmailstudios.astromine.common.component.SidedComponentProvider; import com.github.chainmailstudios.astromine.common.component.inventory.ItemInventoryComponent; import com.github.chainmailstudios.astromine.common.component.inventory.compatibility.ItemInventoryFromInventoryComponent; import com.github.chainmailstudios.astromine.common.utilities.TransportUtilities; @@ -43,7 +43,7 @@ import java.util.stream.IntStream; -public interface ExtendedComponentSidedInventoryProvider extends SidedComponentProvider, InventoryProvider, SidedInventory, ItemInventoryFromInventoryComponent { +public interface ExtendedComponentSidedInventoryProvider extends ComponentProvider, InventoryProvider, SidedInventory, ItemInventoryFromInventoryComponent { @Override default SidedInventory getInventory(BlockState state, WorldAccess world, BlockPos pos) { return this; diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/volume/fluid/FluidVolume.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/volume/fluid/FluidVolume.java index a8469d492..5a479e1dd 100644 --- a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/volume/fluid/FluidVolume.java +++ b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/volume/fluid/FluidVolume.java @@ -27,6 +27,7 @@ import net.minecraft.fluid.Fluid; import net.minecraft.fluid.Fluids; import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.PacketByteBuf; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; @@ -42,6 +43,8 @@ public class FluidVolume extends Volume { private Fluid fluid; + private static final FluidVolume EMPTY = new FluidVolume(Fraction.empty(), Fraction.bucket(), Fluids.EMPTY); + public FluidVolume(Fraction amount, Fraction size, Fluid fluid) { super(ID, amount, size); this.fluid = fluid; @@ -53,7 +56,7 @@ public FluidVolume(Fraction amount, Fraction size, Fluid fluid, Runnable runnabl } public static FluidVolume empty() { - return new FluidVolume(Fraction.empty(), Fraction.bucket(), Fluids.EMPTY); + return EMPTY; } public static FluidVolume oxygen() { @@ -84,6 +87,14 @@ public static FluidVolume fromTag(CompoundTag tag) { return new FluidVolume(Fraction.fromTag(tag.getCompound("amount")), Fraction.fromTag(tag.getCompound("size")), Registry.FLUID.get(new Identifier(tag.getString("fluid")))); } + public static boolean areFluidsEqual(FluidVolume volume1, FluidVolume volume2) { + return Objects.equal(volume1.getFluid(), volume2.getFluid()); + } + + public boolean fluidEquals(FluidVolume volume) { + return Objects.equal(this.getFluid(), volume.getFluid()); + } + public Fluid getFluid() { return this.fluid; } @@ -164,10 +175,43 @@ public > V copy() { return (V) of(getAmount().copy(), getSize().copy(), getFluid()); } + public PacketByteBuf writeToBuffer(PacketByteBuf buffer) { + if (this.isEmpty()) { + buffer.writeBoolean(false); + } else { + buffer.writeBoolean(true); + Fluid fluid = this.getFluid(); + buffer.writeVarInt(Registry.FLUID.getRawId(fluid)); + Fraction amount = this.getAmount(); + buffer.writeLong(amount.getNumerator()); + buffer.writeLong(amount.getDenominator()); + Fraction size = this.getSize(); + buffer.writeLong(size.getNumerator()); + buffer.writeLong(size.getDenominator()); + } + + return buffer; + } + + public static FluidVolume readFromBuffer(PacketByteBuf buffer) { + if (!buffer.readBoolean()) { + return empty(); + } else { + int id = buffer.readVarInt(); + Fraction amount = new Fraction(buffer.readLong(), buffer.readLong()); + Fraction size = new Fraction(buffer.readLong(), buffer.readLong()); + return new FluidVolume(amount, size, Registry.FLUID.get(id)); + } + } + public boolean canAccept(Fluid fluid) { return this.fluid == fluid || this.isEmpty(); } + public boolean canAcceptFrom(FluidVolume volume) { + return this.fluidEquals(volume) || this.isEmpty(); + } + @Override public CompoundTag toTag() { CompoundTag tag = new CompoundTag(); @@ -195,7 +239,7 @@ public boolean equals(Object object) { FluidVolume volume = (FluidVolume) object; - return Objects.equal(fluid, volume.fluid); + return FluidVolume.areFluidsEqual(this, volume); } @Override diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/widget/blade/FluidFilterWidget.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/widget/blade/FluidFilterWidget.java new file mode 100644 index 000000000..e8fc987c9 --- /dev/null +++ b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/common/widget/blade/FluidFilterWidget.java @@ -0,0 +1,107 @@ +package com.github.chainmailstudios.astromine.common.widget.blade; + +import com.github.chainmailstudios.astromine.AstromineCommon; +import com.github.chainmailstudios.astromine.client.BaseRenderer; +import com.github.chainmailstudios.astromine.client.render.sprite.SpriteRenderer; +import com.github.chainmailstudios.astromine.common.utilities.FluidUtilities; +import com.github.chainmailstudios.astromine.common.volume.handler.FluidHandler; +import com.github.vini2003.blade.client.utilities.Layers; +import com.github.vini2003.blade.common.widget.base.AbstractWidget; +import com.github.vini2003.blade.common.widget.base.ButtonWidget; +import com.github.vini2003.blade.common.widget.base.SlotWidget; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.render.OverlayTexture; +import net.minecraft.client.render.RenderLayer; +import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.fluid.Fluid; +import net.minecraft.fluid.Fluids; +import net.minecraft.item.ItemStack; +import net.minecraft.screen.PlayerScreenHandler; +import net.minecraft.text.Text; +import net.minecraft.text.TranslatableText; +import net.minecraft.util.Identifier; +import net.minecraft.util.registry.Registry; +import org.jetbrains.annotations.NotNull; + +import java.util.Collections; +import java.util.List; +import java.util.function.Consumer; +import java.util.function.Supplier; + +public class FluidFilterWidget extends ButtonWidget { + private final Identifier FLUID_BACKGROUND = AstromineCommon.identifier("textures/widget/fluid_filter_background.png"); + + private Supplier fluidSupplier = () -> Fluids.EMPTY; + + private Consumer fluidConsumer = fluid -> {}; + + public Supplier getFluidSupplier() { + return fluidSupplier; + } + + public void setFluidSupplier(Supplier fluidSupplier) { + this.fluidSupplier = fluidSupplier; + } + + public Consumer getFluidConsumer() { + return fluidConsumer; + } + + public void setFluidConsumer(Consumer fluidConsumer) { + this.fluidConsumer = fluidConsumer; + } + + public Identifier getBackgroundTexture() { + return FLUID_BACKGROUND; + } + + @NotNull + @Override + public List getTooltip() { + Identifier fluidId = Registry.FLUID.getId(fluidSupplier.get()); + + return Collections.singletonList(new TranslatableText(String.format("block.%s.%s", fluidId.getNamespace(), fluidId.getPath()))); + } + + @Override + public void onMouseClicked(float x, float y, int button) { + super.onMouseClicked(x, y, button); + + ItemStack stack = getHandler().getPlayer().inventory.getCursorStack(); + + if (isWithin(x, y)) { + if (!stack.isEmpty()) { + FluidHandler.ofOptional(stack).ifPresent(fluids -> { + fluidSupplier = () -> fluids.getFirst().getFluid(); + fluidConsumer.accept(fluidSupplier.get()); + }); + } else if (button == 2) { + fluidSupplier = () -> Fluids.EMPTY; + fluidConsumer.accept(fluidSupplier.get()); + } + } + } + + @Override + public void drawWidget(@NotNull MatrixStack matrices, @NotNull VertexConsumerProvider provider) { + if (getHidden()) { + return; + } + + float x = getPosition().getX(); + float y = getPosition().getY(); + + float sX = getSize().getWidth(); + float sY = getSize().getHeight(); + + RenderLayer layer = Layers.get(getBackgroundTexture()); + + BaseRenderer.drawTexturedQuad(matrices, provider, layer, x, y, getSize().getWidth(), getSize().getHeight(), getBackgroundTexture()); + + if (fluidSupplier.get() != Fluids.EMPTY) { + SpriteRenderer.beginPass().setup(provider, RenderLayer.getSolid()).sprite(FluidUtilities.texture(fluidSupplier.get())[0]).color(FluidUtilities.color(MinecraftClient.getInstance().player, fluidSupplier.get())).light(0x00f000f0).overlay( + OverlayTexture.DEFAULT_UV).alpha(0xff).normal(matrices.peek().getNormal(), 0, 0, 0).position(matrices.peek().getModel(), x + 1, y + 1, x + sX - 1, y + sY - 1, 0F).next(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE); + } + } +} diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/mixin/BucketItemMixin.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/mixin/BucketItemMixin.java deleted file mode 100644 index 716423d36..000000000 --- a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/mixin/BucketItemMixin.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2020 Chainmail Studios - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package com.github.chainmailstudios.astromine.mixin; - -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockEntityProvider; -import net.minecraft.block.BlockState; -import net.minecraft.block.entity.BlockEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.fluid.Fluid; -import net.minecraft.fluid.Fluids; -import net.minecraft.item.BucketItem; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Hand; -import net.minecraft.util.TypedActionResult; -import net.minecraft.util.hit.BlockHitResult; -import net.minecraft.util.hit.HitResult; -import net.minecraft.util.math.MathHelper; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.RaycastContext; -import net.minecraft.world.World; - -import com.github.chainmailstudios.astromine.common.component.SidedComponentProvider; -import com.github.chainmailstudios.astromine.registry.AstromineComponentTypes; - -@Mixin(BucketItem.class) -public class BucketItemMixin { - @Shadow - @Final - public Fluid fluid; - - private static BlockHitResult astromine_raycast(World world, PlayerEntity player, RaycastContext.FluidHandling fluidHandling) { - float f = player.pitch; - float g = player.yaw; - - Vec3d vec3d = player.getCameraPosVec(1.0F); - - float h = MathHelper.cos(-g * 0.017453292F - 3.1415927F); - float i = MathHelper.sin(-g * 0.017453292F - 3.1415927F); - float j = -MathHelper.cos(-f * 0.017453292F); - float k = MathHelper.sin(-f * 0.017453292F); - - float l = i * j; - float n = h * j; - - Vec3d vec3d2 = vec3d.add((double) l * 5.0D, (double) k * 5.0D, (double) n * 5.0D); - - return world.raycast(new RaycastContext(vec3d, vec3d2, RaycastContext.ShapeType.OUTLINE, fluidHandling, player)); - } - - @Inject(at = @At("HEAD"), method = "use(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/TypedActionResult;", cancellable = true) - void onUse(World world, PlayerEntity user, Hand hand, CallbackInfoReturnable> cir) { - BlockHitResult result = astromine_raycast(world, user, fluid == Fluids.EMPTY ? RaycastContext.FluidHandling.SOURCE_ONLY : RaycastContext.FluidHandling.NONE); - - if (result.getType() == HitResult.Type.BLOCK) { - BlockState state = world.getBlockState(result.getBlockPos()); - Block block = state.getBlock(); - - if (block instanceof BlockEntityProvider) { - BlockEntity attached = world.getBlockEntity(result.getBlockPos()); - - if (attached instanceof SidedComponentProvider) { - if (((SidedComponentProvider) attached).hasComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT)) { - if (((SidedComponentProvider) attached).getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getFirstExtractableVolume(result.getSide()) != null) { - cir.setReturnValue(TypedActionResult.fail(user.getStackInHand(hand))); - } - } - } - } - } - } -} diff --git a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/mixin/LivingEntityMixin.java b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/mixin/LivingEntityMixin.java index 5367942df..7226dc063 100644 --- a/astromine-core/src/main/java/com/github/chainmailstudios/astromine/mixin/LivingEntityMixin.java +++ b/astromine-core/src/main/java/com/github/chainmailstudios/astromine/mixin/LivingEntityMixin.java @@ -114,7 +114,7 @@ void onTick(CallbackInfo callbackInformation) { Box collisionBox = entity.getBoundingBox(); - for (BlockPos blockPos : (Iterable) () -> BlockPos.method_29715(collisionBox).iterator()) { + for (BlockPos blockPos : (Iterable) () -> BlockPos.stream(collisionBox).iterator()) { BlockState blockState = entity.world.getBlockState(blockPos); if (blockState.getBlock() instanceof FluidBlock) { diff --git a/astromine-core/src/main/resources/assets/astromine/lang/de_de.json b/astromine-core/src/main/resources/assets/astromine/lang/de_de.json new file mode 100644 index 000000000..c951cbd12 --- /dev/null +++ b/astromine-core/src/main/resources/assets/astromine/lang/de_de.json @@ -0,0 +1,265 @@ +{ + "block.minecraft.empty": "Leer", + "entity.astromine.super_space_slime": "Jelanium: Super Allschleim", + "entity.astromine.space_slime": "Allschleim", + "entity.astromine.primitive_rocket": "Primitive Rakete", + "text.astromine.rocket.disassemble_empty_fuel": "Rakete unterging sofortige ungeplante Demontage: Kein Treibstoff geladen!", + "text.astromine.rocket.disassemble_collision": "Rakete unterging sofortige ungeplante Demontage: Flugbahn blockiert!", + "text.astromine.rocket.disassemble_invalid_fuel": "Rakete unterging sofortige ungeplante Demontage: Falscher Treibstoff geladen!", + "text.astromine.message.holographic_connection_successful": "Projektor wurde erfolgreich auf %s mit dem Projector auf %s verbunden.", + "text.astromine.message.holographic_connection_failed": "Verbindung vom Projector auf %s mit dem Projektor auf %s fehlgeschlagen.", + "text.astromine.message.holographic_connection_clear": "Ausgewählter Projektor wurde zurückgesetzt!", + "text.astromine.message.holographic_connector_select": "Projektor auf %s ausgewählt!", + "text.astromine.tooltip.fractional_bar": "%s of %s (%s)", + "text.astromine.tooltip.fractional_value": "%s/%s", + "text.astromine.tooltip.fractional_value_simple": "%s", + "text.astromine.tooltip.energy_value": "%s E", + "text.astromine.tooltip.compound_energy_value": "%s/%s E", + "text.astromine.tooltip.speed": "%sx Geschwindigkeit", + "text.astromine.tooltip.cable.speed": "%s E/t", + "text.astromine.fluid": "Flüssigkeit", + "text.astromine.energy": "Energie", + "text.astromine.item": "Gegenstand", + "text.astromine.base": "Basis", + "text.astromine.up": "Oben", + "text.astromine.down": "Unten", + "text.astromine.left": "Links", + "text.astromine.right": "Rechts", + "text.astromine.front": "Vorne", + "text.astromine.back": "Hinten", + "text.astromine.siding.input": "§bEingabe", + "text.astromine.siding.output": "§6Ausgabe", + "text.astromine.siding.input_output": "§bEingabe §7/ §6Ausgabe", + "text.astromine.siding.none": "§7Nichts", + "text.astromine.siding.disabled": "§7§mDeaktiviert", + "text.astromine.siding.west": "Rechts", + "text.astromine.siding.east": "Links", + "text.astromine.siding.up": "Oben", + "text.astromine.siding.down": "Unten", + "text.astromine.siding.north": "Vorne", + "text.astromine.siding.south": "Hinten", + "text.astromine.rocket.launch": "Start", + "text.astromine.rocket.destroy": "Zerstören!", + "text.astromine.rocket.fuel_status": "Treibstoff ausreichend für %s Flugzeit.", + "item.astromine.primitive_machine_chassis": "Primitives Maschienengehäuse", + "item.astromine.basic_machine_chassis": "Maschienengehäuse", + "item.astromine.advanced_machine_chassis": "Verbessertes Maschienengehäuse", + "item.astromine.elite_machine_chassis": "Elitäres Maschienengehäuse", + "item.astromine.graphite_sheet": "Graphit Folie", + "item.astromine.gas_canister": "Gaskannister", + "item.astromine.pressurized_gas_canister": "Komprimierter Gaskannister", + "item.astromine.basic_battery": "Batterie", + "item.astromine.advanced_battery": "Verbesserte Batterie", + "item.astromine.elite_battery": "Elitäre Batterie", + "item.astromine.creative_battery": "Kreative Batterie", + "item.astromine.fire_extinguisher": "Feuerlöscher", + "item.astromine.holographic_connector": "Holografischer Verbinder", + "item.astromine.holographic_bridge_projector": "Holografischer Brückenprojektor", + "item.astromine.primitive_rocket_fuel_tank": "Primitiver Raketentreibstofftank", + "item.astromine.primitive_rocket_hull": "Primitive Raketenaußenwand", + "item.astromine.primitive_rocket_plating": "Primitive Raketenbeschichtung", + "item.astromine.primitive_rocket_booster": "Primitive Raketentriebwerk", + "itemGroup.astromine.core": "Astromine: Kern", + "itemGroup.astromine.discoveries": "Astromine: Entdeckungen", + "itemGroup.astromine.foundations": "Astromine: Grundlagen", + "itemGroup.astromine.transportations": "Astromine: Transportation", + "itemGroup.astromine.technologies": "Astromine: Technologien", + "block.astromine.electrolyzer": "Elektrolyser", + "block.astromine.fluid_mixer": "Flüssigkeiten-Mixer", + "block.astromine.creative_capacitor": "Kreativer Kondensator", + "block.astromine.creative_buffer": "Kreativer Buffer", + "block.astromine.primitive_buffer": "Primitiver Buffer", + "block.astromine.basic_buffer": "Buffer", + "block.astromine.advanced_buffer": "Verbesserter Buffer", + "block.astromine.elite_buffer": "Elitärer Buffer", + "block.astromine.vent": "Luftschacht", + "block.astromine.primitive_solid_generator": "Primitiver Feststoffgenerator", + "block.astromine.basic_solid_generator": "Feststoffgenerator", + "block.astromine.advanced_solid_generator": "Verbesserter Feststoffgenerator", + "block.astromine.elite_solid_generator": "Elitärer Feststoffgenerator", + "block.astromine.primitive_liquid_generator": "Primitiver Flüssiggenerator", + "block.astromine.basic_liquid_generator": "Flüssiggenerator", + "block.astromine.advanced_liquid_generator": "Verbesserter Flüssiggenerator", + "block.astromine.elite_liquid_generator": "Elitärer Flüssiggenerator", + "block.astromine.primitive_presser": "Primitive Presse", + "block.astromine.basic_presser": "Presse", + "block.astromine.advanced_presser": "Verbesserte Presse", + "block.astromine.elite_presser": "Elitäre Presse", + "block.astromine.primitive_triturator": "Primitiver Triturator", + "block.astromine.basic_triturator": "Triturator", + "block.astromine.advanced_triturator": "Verbesserter Triturator", + "block.astromine.elite_triturator": "Elitärer Triturator", + "block.astromine.primitive_electric_smelter": "Primitive Elektroschmelze", + "block.astromine.basic_electric_smelter": "Elektroschmelze", + "block.astromine.advanced_electric_smelter": "Verbesserte Elektroschmelze", + "block.astromine.elite_electric_smelter": "Elitäre Elektroschmelze", + "block.astromine.primitive_alloy_smelter": "Primitive Legierungsschmelze", + "block.astromine.basic_alloy_smelter": "Legierungsschmelze", + "block.astromine.advanced_alloy_smelter": "Verbesserte Legierungsschmelze", + "block.astromine.elite_alloy_smelter": "Elitäre Legierungsschmelze", + "block.astromine.primitive_electrolyzer": "Primitiver Elektrolyser", + "block.astromine.basic_electrolyzer": "Elektrolyser", + "block.astromine.advanced_electrolyzer": "Verbesserter Elektrolyser", + "block.astromine.elite_electrolyzer": "Elitärer Elektrolyser", + "block.astromine.primitive_refinery": "Primitive Raffinerie", + "block.astromine.basic_refinery": "Raffinerie", + "block.astromine.advanced_refinery": "Verbesserte Raffinerie", + "block.astromine.elite_refinery": "Elitäre Raffinerie", + "block.astromine.primitive_fluid_mixer": "Primitiver Flüssigkeiten-Mixer", + "block.astromine.basic_fluid_mixer": "Flüssigkeiten-Mixer", + "block.astromine.advanced_fluid_mixer": "Verbesserter Flüssigkeiten-Mixer", + "block.astromine.elite_fluid_mixer": "Elitärer Flüssigkeiten-Mixer", + "block.astromine.fluid_cable": "Flüssigkeiten-Kabel", + "block.astromine.primitive_energy_cable": "Primitives Energiekabel", + "block.astromine.basic_energy_cable": "Energiekabel", + "block.astromine.advanced_energy_cable": "Verbessertes Energiekabel", + "block.astromine.elite_energy_cable": "Elitäres Energiekabel", + "block.astromine.primitive_capacitor": "Primitiver Kodensator", + "block.astromine.basic_capacitor": "Kondensator", + "block.astromine.advanced_capacitor": "Verbesserter Kodensator", + "block.astromine.elite_capacitor": "Elitärer Kondensator", + "block.astromine.airlock": "Luftschleuse", + "block.astromine.altar_pedestal": "Altar Podest", + "block.astromine.altar": "Altar", + "item.astromine.tin_wire": "Zinnkabel", + "item.astromine.copper_wire": "Kupferkabel", + "item.astromine.silver_wire": "Silberkabel", + "item.astromine.lead_wire": "Bleikabel", + "item.astromine.gold_wire": "Goldkabel", + "item.astromine.steel_wire": "Stahlkabel", + "item.astromine.electrum_wire": "Elektrumkabel", + "block.astromine.primitive_tank": "Primitiver Tank", + "block.astromine.basic_tank": "Tank", + "block.astromine.advanced_tank": "Verbesserter Tank", + "block.astromine.elite_tank": "Elitärer Tank", + "block.astromine.creative_tank": "Kreativer Tank", + "block.astromine.fluid_extractor": "Flüssigkeitextraktor", + "block.astromine.fluid_inserter": "Flüssigkeitinserierer", + "block.astromine.block_breaker": "Blockbrecher", + "block.astromine.block_placer": "Blocksetzer", + "block.astromine.nuclear_warhead": "V-Bomb", + "block.astromine.holographic_bridge_projector": "Holografischer Brückenprojektor", + "block.astromine.asteroid_stone": "Asteroidenstein", + "block.astromine.moon_stone": "Mondstein", + "block.astromine.blazing_asteroid_stone": "Glühender Asteroidenstein", + "block.astromine.meteor_stone": "Meteorstein", + "block.astromine.tin_ore": "Zinnerz", + "block.astromine.copper_ore": "Kupfererz", + "block.astromine.silver_ore": "Silbererz", + "block.astromine.lead_ore": "Bleierz", + "block.astromine.asteroid_metite_ore": "Asteroidisches Metiteerz", + "block.astromine.meteor_metite_ore": "Meteorisches Metiterz", + "block.astromine.asterite_block": "Asteritblock", + "block.astromine.galaxium_block": "Galaxiumblock", + "block.astromine.metite_block": "Metitblock", + "block.astromine.stellum_block": "Stellumblock", + "block.astromine.univite_block": "Univitblock", + "block.astromine.lunum_block": "Lunumblock", + "block.astromine.tin_block": "Zinnblock", + "block.astromine.copper_block": "Kupferblock", + "block.astromine.silver_block": "Silberblock", + "block.astromine.lead_block": "Bleiblock", + "block.astromine.bronze_block": "Bronzeblock", + "block.astromine.steel_block": "Stahlblock", + "block.astromine.electrum_block": "Elektrumblock", + "block.astromine.rose_gold_block": "Rosengoldblock", + "block.astromine.sterling_silver_block": "Sterlingsilberblock", + "block.astromine.fools_gold_block": "Falscher Goldblock", + "block.astromine.meteoric_steel_block": "Meteorischer Stahlblock", + "block.astromine.asteroid_coal_ore": "Asteroidisches Kohleerz", + "block.astromine.asteroid_iron_ore": "Asteroidisches Eisenerz", + "block.astromine.asteroid_gold_ore": "Asteroidisches Golderz", + "block.astromine.asteroid_redstone_ore": "Asteroidisches Redstoneerz", + "block.astromine.asteroid_lapis_ore": "Asteroidisches Lapiserz", + "block.astromine.asteroid_diamond_ore": "Asteroidisches Diamanterz", + "block.astromine.asteroid_asterite_ore": "Asteroidisches Asteriterz", + "block.astromine.asteroid_stellum_ore": "Asteroidisches Stellumerz", + "block.astromine.asteroid_galaxium_ore": "Asteroidisches Galaxiumerz", + "block.astromine.asteroid_emerald_ore": "Asteroidisches Smaragderz", + "block.astromine.asteroid_tin_ore": "Asteroidisches Zinnerz", + "block.astromine.asteroid_copper_ore": "Asteroidisches Kupfererz", + "block.astromine.asteroid_silver_ore": "Asteroidisches Silbererz", + "block.astromine.asteroid_lead_ore": "Asteroidisches Bleierz", + "block.astromine.moon_lunum_ore": "Lunumerz", + "block.astromine.meteor_stone_slab": "Meteorische Steinstufe", + "block.astromine.meteor_stone_stairs": "Meteorische Steintreppen", + "block.astromine.meteor_stone_wall": "Meteorische Steinwand", + "block.astromine.asteroid_stone_slab": "Asteroidische Steinstufe", + "block.astromine.asteroid_stone_stairs": "Asteroidische Steintreppen", + "block.astromine.asteroid_stone_wall": "Asteroidische Steinwand", + "block.astromine.moon_stone_slab": "Mondstein Stufe", + "block.astromine.moon_stone_stairs": "Mondstein Treppen", + "block.astromine.moon_stone_wall": "Mondstein Wand", + "block.astromine.martian_stone_slab": "Marsianische Steinstufe", + "block.astromine.martian_stone_stairs": "Marsianische Steintreppen", + "block.astromine.martian_stone_wall": "Marsianische Steinwand", + "block.astromine.vulcan_stone_slab": "Vulkangesteinstufe", + "block.astromine.vulcan_stone_stairs": "Vulkangesteintreppen", + "block.astromine.vulcan_stone_wall": "Vulkangesteinwand", + "block.astromine.martian_soil": "Marsianische Erde", + "block.astromine.martian_stone": "Marsianisches Gestein", + "block.astromine.vulcan_stone": "Vulkangestein", + "block.astromine.oxygen": "Sauerstoff", + "block.astromine.hydrogen": "Wasserstoff", + "block.astromine.crude_oil": "Rohöl", + "block.astromine.residual_fuel_oil": "Reststofföl", + "block.astromine.heavy_gas_oil": "Schwergasöl", + "block.astromine.diesel": "Diesel", + "block.astromine.kerosene": "Kerosin", + "block.astromine.naphtha": "Naphtha", + "block.astromine.gasoline": "Benzin", + "block.astromine.butane": "Butan", + "block.astromine.kerosene_oxygen_fuel": "Kerosin-Sauerstoff Treibstoff", + "block.astromine.alternator": "Alternator", + "block.astromine.splitter": "Splitter", + "block.astromine.incinerator": "Einäscherer", + "block.astromine.inserter": "Eingeber", + "block.astromine.fast_inserter": "Schneller Eingeber", + "block.astromine.basic_conveyor": "Laufband", + "block.astromine.basic_vertical_conveyor": "Vertikales Laufband", + "block.astromine.basic_downward_vertical_conveyor": "Absteigendes vertikales Laufband", + "block.astromine.advanced_conveyor": "Verbessertes Laufband", + "block.astromine.advanced_vertical_conveyor": "Verbessertes vertikales Laufband", + "block.astromine.advanced_downward_vertical_conveyor": "Verbessertes absteigendes vertikales Laufband", + "block.astromine.elite_conveyor": "Elitäres Laufband", + "block.astromine.elite_vertical_conveyor": "Elitäres vertikales Laufband", + "block.astromine.elite_downward_vertical_conveyor": "Elitäres absteigendes vertikales Laufband", + "block.astromine.catwalk": "Laufsteg", + "block.astromine.catwalk_stairs": "Laufstegtreppen", + "gas.astromine.oxygen": "Sauerstoff", + "gas.astromine.rocket_fuel": "Raketentreibstoff", + "gas.minecraft.empty": "Vakuum", + "item.astromine.oxygen_bucket": "Sauerstoffeimer", + "item.astromine.hydrogen_bucket": "Wasserstoffeimer", + "item.astromine.crude_oil_bucket": "Rohöleimer", + "item.astromine.residual_fuel_oil_bucket": "Reststofföleimer", + "item.astromine.heavy_gas_oil_bucket": "Schwergasöleimer", + "item.astromine.diesel_bucket": "Dieseleimer", + "item.astromine.kerosene_bucket": "Kerosineimer", + "item.astromine.naphtha_bucket": "Naphthaeimer", + "item.astromine.gasoline_bucket": "Benzineimer", + "item.astromine.butane_bucket": "Butaneimer", + "item.astromine.kerosene_oxygen_fuel_bucket": "Kerosin-Sauerstoff-Treibstoffeimer", + "block.astromine.rocket_fuel": "Raketentreibstoff", + "item.astromine.energy": "Energie", + "item.astromine.fluid": "Flüssigkeit", + "item.astromine.item": "Gegenstand", + "item.astromine.rocket_fuel_bucket": "Raketentreibstoffeimer", + "item.astromine.asterite_fragment": "Asteritfragment", + "item.astromine.meteor_metite_cluster": "Meteorischer Metithaufen", + "item.astromine.asteroid_metite_cluster": "Asteroidischer Metitehaufen", + "item.astromine.asteroid_coal_cluster": "Asteroidischer Kohlehaufen", + "item.astromine.asteroid_iron_cluster": "Asteroidischer Eisenhaufen", + "item.astromine.asteroid_gold_cluster": "Asteroidischer Goldhaufen", + "item.astromine.asteroid_redstone_cluster": "Asteroidischer Redstonehaufen", + "item.astromine.asteroid_lapis_cluster": "Asteroidischer Lapishaufen", + "item.astromine.asteroid_diamond_cluster": "Asteroidischer Diamanthaufen", + "item.astromine.asteroid_emerald_cluster": "Asteroidischer Smaragdhaufen", + "item.astromine.asteroid_asterite_cluster": "Asteroidischer Asterithaufen", + "item.astromine.asteroid_stellum_cluster": "Asteroidischer Stellumhaufen", + "item.astromine.asteroid_galaxium_cluster": "Asteroidischer Galaxiumhaufen", + "item.astromine.asteroid_tin_cluster": "Asteroidischer Zinnhaufen", + "item.astromine.asteroid_copper_cluster": "Asteroidischer Kupferhaufen", + "item.astromine.asteroid_silver_cluster": "Asteroidischer Silberhaufen", + "item.astromine.asteroid_lead_cluster": "Asteroidischer Bleihaufen" +} diff --git a/astromine-core/src/main/resources/assets/astromine/lang/en_us.json b/astromine-core/src/main/resources/assets/astromine/lang/en_us.json index 985479618..1bc3548d5 100644 --- a/astromine-core/src/main/resources/assets/astromine/lang/en_us.json +++ b/astromine-core/src/main/resources/assets/astromine/lang/en_us.json @@ -213,6 +213,7 @@ "block.astromine.alternator": "Alternator", "block.astromine.splitter": "Splitter", "block.astromine.incinerator": "Incinerator", + "block.astromine.drain": "Drain", "block.astromine.inserter": "Inserter", "block.astromine.fast_inserter": "Fast Inserter", "block.astromine.basic_conveyor": "Basic Conveyor", diff --git a/astromine-core/src/main/resources/assets/astromine/textures/widget/fluid_filter_background.png b/astromine-core/src/main/resources/assets/astromine/textures/widget/fluid_filter_background.png new file mode 100644 index 000000000..2817da34d Binary files /dev/null and b/astromine-core/src/main/resources/assets/astromine/textures/widget/fluid_filter_background.png differ diff --git a/astromine-core/src/main/resources/astromine.mixins.json b/astromine-core/src/main/resources/astromine.mixins.json index 9fdd6f292..baa6ad6f7 100644 --- a/astromine-core/src/main/resources/astromine.mixins.json +++ b/astromine-core/src/main/resources/astromine.mixins.json @@ -4,7 +4,7 @@ "package": "com.github.chainmailstudios.astromine.mixin", "compatibilityLevel": "JAVA_8", "mixins": [ - "AbstractBlockMixin", "AbstractMinecartEntityMixin", "BiomeLayerSamplerMixin", "BucketItemMixin", + "AbstractBlockMixin", "AbstractMinecartEntityMixin", "BiomeLayerSamplerMixin", "DiggerEnchantmentTargetMixin", "EntityMixin", "FishingBobberEntityMixin", "GravityEntityMixin", "HoneyBlockMixin", "IdentifierMixin", "ItemEntityMixin", "LivingEntityMixin", "PiglinBrainMixin", diff --git a/astromine-discoveries/src/main/java/com/github/chainmailstudios/astromine/discoveries/common/entity/PrimitiveRocketEntity.java b/astromine-discoveries/src/main/java/com/github/chainmailstudios/astromine/discoveries/common/entity/PrimitiveRocketEntity.java index ca814177d..a67f560de 100644 --- a/astromine-discoveries/src/main/java/com/github/chainmailstudios/astromine/discoveries/common/entity/PrimitiveRocketEntity.java +++ b/astromine-discoveries/src/main/java/com/github/chainmailstudios/astromine/discoveries/common/entity/PrimitiveRocketEntity.java @@ -35,6 +35,7 @@ import com.github.chainmailstudios.astromine.discoveries.common.entity.base.RocketEntity; import com.github.chainmailstudios.astromine.discoveries.common.screenhandler.RocketScreenHandler; import com.github.chainmailstudios.astromine.discoveries.registry.AstromineDiscoveriesDimensions; +import com.github.chainmailstudios.astromine.discoveries.registry.AstromineDiscoveriesTags; import com.github.chainmailstudios.astromine.foundations.registry.AstromineFoundationsFluids; import com.github.chainmailstudios.astromine.registry.AstromineDimensions; import io.netty.buffer.Unpooled; @@ -92,7 +93,7 @@ public void openInventory(PlayerEntity player) { @Override protected Predicate createFuelPredicate() { - return volume -> volume.getFluid() == AstromineFoundationsFluids.KEROSENE_OXYGEN_FUEL; + return volume -> volume.getFluid().isIn(AstromineDiscoveriesTags.ROCKET_FUELS); } @Override diff --git a/astromine-discoveries/src/main/java/com/github/chainmailstudios/astromine/discoveries/common/entity/base/RocketEntity.java b/astromine-discoveries/src/main/java/com/github/chainmailstudios/astromine/discoveries/common/entity/base/RocketEntity.java index d9a5d8bbf..f8b218250 100644 --- a/astromine-discoveries/src/main/java/com/github/chainmailstudios/astromine/discoveries/common/entity/base/RocketEntity.java +++ b/astromine-discoveries/src/main/java/com/github/chainmailstudios/astromine/discoveries/common/entity/base/RocketEntity.java @@ -130,7 +130,7 @@ public void tick() { } } - if (BlockPos.Mutable.method_29715(getBoundingBox()).anyMatch(pos -> world.getBlockState(pos).isFullCube(world, pos)) && !world.isClient) { + if (BlockPos.Mutable.stream(getBoundingBox()).anyMatch(pos -> world.getBlockState(pos).isFullCube(world, pos)) && !world.isClient) { this.world.getPlayers().forEach(player -> player.sendMessage(new TranslatableText("text.astromine.rocket.disassemble_collision").formatted(Formatting.RED), false)); this.tryDisassemble(false); diff --git a/astromine-discoveries/src/main/java/com/github/chainmailstudios/astromine/discoveries/registry/AstromineDiscoveriesBlocks.java b/astromine-discoveries/src/main/java/com/github/chainmailstudios/astromine/discoveries/registry/AstromineDiscoveriesBlocks.java index df3a6ce6c..c8fe98bc3 100644 --- a/astromine-discoveries/src/main/java/com/github/chainmailstudios/astromine/discoveries/registry/AstromineDiscoveriesBlocks.java +++ b/astromine-discoveries/src/main/java/com/github/chainmailstudios/astromine/discoveries/registry/AstromineDiscoveriesBlocks.java @@ -43,7 +43,7 @@ import com.github.chainmailstudios.astromine.registry.AstromineBlocks; public class AstromineDiscoveriesBlocks extends AstromineBlocks { - public static final Block ASTEROID_STONE = register("asteroid_stone", new Block(FabricBlockSettings.of(Material.STONE, MaterialColor.GRAY).requiresTool().breakByTool(FabricToolTags.PICKAXES, 3).strength(50, 1500)), AstromineDiscoveriesItems.getBasicSettings().fireproof()); + public static final Block ASTEROID_STONE = register("asteroid_stone", new Block(FabricBlockSettings.of(Material.STONE, MaterialColor.GRAY).requiresTool().breakByTool(FabricToolTags.PICKAXES, 3).strength(1.5F, 3F)), AstromineDiscoveriesItems.getBasicSettings().fireproof()); public static final Block MOON_STONE = register("moon_stone", new Block(FabricBlockSettings.of(Material.STONE, MaterialColor.GRAY).requiresTool().breakByTool(FabricToolTags.PICKAXES, 0).strength(1, 3)), AstromineDiscoveriesItems.getBasicSettings()); public static final Block VULCAN_STONE = register("vulcan_stone", new Block(FabricBlockSettings.of(Material.STONE, MaterialColor.GRAY).requiresTool().breakByTool(FabricToolTags.PICKAXES, 1).strength(3, 4)), AstromineDiscoveriesItems.getBasicSettings()); public static final Block MARTIAN_SOIL = register("martian_soil", new Block(FabricBlockSettings.of(Material.SOIL, MaterialColor.RED).requiresTool().breakByTool(FabricToolTags.SHOVELS, 0).strength(0.5f, 0.75f)), AstromineDiscoveriesItems.getBasicSettings()); diff --git a/astromine-discoveries/src/main/java/com/github/chainmailstudios/astromine/discoveries/registry/AstromineDiscoveriesTags.java b/astromine-discoveries/src/main/java/com/github/chainmailstudios/astromine/discoveries/registry/AstromineDiscoveriesTags.java new file mode 100644 index 000000000..304d2ecfd --- /dev/null +++ b/astromine-discoveries/src/main/java/com/github/chainmailstudios/astromine/discoveries/registry/AstromineDiscoveriesTags.java @@ -0,0 +1,13 @@ +package com.github.chainmailstudios.astromine.discoveries.registry; + +import net.fabricmc.fabric.api.tag.TagRegistry; + +import net.minecraft.fluid.Fluid; +import net.minecraft.tag.Tag; + +import com.github.chainmailstudios.astromine.AstromineCommon; +import com.github.chainmailstudios.astromine.registry.AstromineTags; + +public class AstromineDiscoveriesTags extends AstromineTags { + public static final Tag ROCKET_FUELS = TagRegistry.fluid(AstromineCommon.identifier("rocket_fuels")); +} diff --git a/astromine-discoveries/src/main/resources/data/astromine/tags/fluids/rocket_fuels.json b/astromine-discoveries/src/main/resources/data/astromine/tags/fluids/rocket_fuels.json new file mode 100644 index 000000000..ce30929e5 --- /dev/null +++ b/astromine-discoveries/src/main/resources/data/astromine/tags/fluids/rocket_fuels.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "#c:kerosene_oxygen_fuel" + ] +} diff --git a/astromine-foundations/src/datagen/java/com/github/chainmailstudios/astromine/foundations/datagen/generators/recipe/SalvageBlastingRecipeGenerator.java b/astromine-foundations/src/datagen/java/com/github/chainmailstudios/astromine/foundations/datagen/generators/recipe/SalvageBlastingRecipeGenerator.java new file mode 100644 index 000000000..6151a1238 --- /dev/null +++ b/astromine-foundations/src/datagen/java/com/github/chainmailstudios/astromine/foundations/datagen/generators/recipe/SalvageBlastingRecipeGenerator.java @@ -0,0 +1,34 @@ +package com.github.chainmailstudios.astromine.foundations.datagen.generators.recipe; + +import com.github.chainmailstudios.astromine.datagen.generator.recipe.set.MultiBlastingSetRecipeGenerator; +import com.github.chainmailstudios.astromine.datagen.generator.recipe.set.MultiSmeltingSetRecipeGenerator; +import com.github.chainmailstudios.astromine.datagen.material.MaterialItemType; + +import java.util.Arrays; +import java.util.List; + +import static com.github.chainmailstudios.astromine.datagen.material.MaterialItemType.AXE; +import static com.github.chainmailstudios.astromine.datagen.material.MaterialItemType.BOOTS; +import static com.github.chainmailstudios.astromine.datagen.material.MaterialItemType.CHESTPLATE; +import static com.github.chainmailstudios.astromine.datagen.material.MaterialItemType.EXCAVATOR; +import static com.github.chainmailstudios.astromine.datagen.material.MaterialItemType.HAMMER; +import static com.github.chainmailstudios.astromine.datagen.material.MaterialItemType.HELMET; +import static com.github.chainmailstudios.astromine.datagen.material.MaterialItemType.HOE; +import static com.github.chainmailstudios.astromine.datagen.material.MaterialItemType.LEGGINGS; +import static com.github.chainmailstudios.astromine.datagen.material.MaterialItemType.MATTOCK; +import static com.github.chainmailstudios.astromine.datagen.material.MaterialItemType.MINING_TOOL; +import static com.github.chainmailstudios.astromine.datagen.material.MaterialItemType.PICKAXE; +import static com.github.chainmailstudios.astromine.datagen.material.MaterialItemType.SHOVEL; +import static com.github.chainmailstudios.astromine.datagen.material.MaterialItemType.SWORD; + +public class SalvageBlastingRecipeGenerator extends MultiBlastingSetRecipeGenerator { + public static final List SALVAGEABLE = Arrays.asList( + PICKAXE, AXE, SHOVEL, SWORD, HOE, + HAMMER, EXCAVATOR, MINING_TOOL, MATTOCK, + HELMET, CHESTPLATE, LEGGINGS, BOOTS + ); + + public SalvageBlastingRecipeGenerator(MaterialItemType output) { + super(SALVAGEABLE, output); + } +} diff --git a/astromine-foundations/src/datagen/java/com/github/chainmailstudios/astromine/foundations/datagen/generators/recipe/SalvageSmeltingRecipeGenerator.java b/astromine-foundations/src/datagen/java/com/github/chainmailstudios/astromine/foundations/datagen/generators/recipe/SalvageSmeltingRecipeGenerator.java new file mode 100644 index 000000000..0c98f0ace --- /dev/null +++ b/astromine-foundations/src/datagen/java/com/github/chainmailstudios/astromine/foundations/datagen/generators/recipe/SalvageSmeltingRecipeGenerator.java @@ -0,0 +1,21 @@ +package com.github.chainmailstudios.astromine.foundations.datagen.generators.recipe; + +import com.github.chainmailstudios.astromine.datagen.generator.recipe.set.MultiSmeltingSetRecipeGenerator; +import com.github.chainmailstudios.astromine.datagen.material.MaterialItemType; + +import static com.github.chainmailstudios.astromine.datagen.material.MaterialItemType.*; + +import java.util.Arrays; +import java.util.List; + +public class SalvageSmeltingRecipeGenerator extends MultiSmeltingSetRecipeGenerator { + public static final List SALVAGEABLE = Arrays.asList( + PICKAXE, AXE, SHOVEL, SWORD, HOE, + HAMMER, EXCAVATOR, MINING_TOOL, MATTOCK, + HELMET, CHESTPLATE, LEGGINGS, BOOTS + ); + + public SalvageSmeltingRecipeGenerator(MaterialItemType output) { + super(SALVAGEABLE, output); + } +} diff --git a/astromine-foundations/src/datagen/java/com/github/chainmailstudios/astromine/foundations/datagen/registry/AstromineFoundationsRecipeGenerators.java b/astromine-foundations/src/datagen/java/com/github/chainmailstudios/astromine/foundations/datagen/registry/AstromineFoundationsRecipeGenerators.java index 8eea33651..c4c9b64d0 100644 --- a/astromine-foundations/src/datagen/java/com/github/chainmailstudios/astromine/foundations/datagen/registry/AstromineFoundationsRecipeGenerators.java +++ b/astromine-foundations/src/datagen/java/com/github/chainmailstudios/astromine/foundations/datagen/registry/AstromineFoundationsRecipeGenerators.java @@ -17,6 +17,8 @@ import com.github.chainmailstudios.astromine.datagen.registry.AstromineRecipeGenerators; import com.github.chainmailstudios.astromine.foundations.datagen.generators.recipe.AppleCraftingRecipeGenerator; import com.github.chainmailstudios.astromine.foundations.datagen.generators.recipe.ArmorCraftingRecipeGenerators; +import com.github.chainmailstudios.astromine.foundations.datagen.generators.recipe.SalvageBlastingRecipeGenerator; +import com.github.chainmailstudios.astromine.foundations.datagen.generators.recipe.SalvageSmeltingRecipeGenerator; import com.github.chainmailstudios.astromine.foundations.datagen.generators.recipe.ToolCraftingRecipeGenerators; import com.github.chainmailstudios.astromine.foundations.datagen.generators.recipe.WrenchCraftingRecipeGenerator; import com.github.chainmailstudios.astromine.foundations.registry.AstromineFoundationsBlocks; @@ -139,6 +141,11 @@ public class AstromineFoundationsRecipeGenerators extends AstromineRecipeGenerat public final RecipeGenerator BOOTS_SMITHING_FROM_INGOT = register(new SmithingSetRecipeGenerator(BOOTS, INGOT)); public final RecipeGenerator BOOTS_SMITHING_FROM_GEM = register(new SmithingSetRecipeGenerator(BOOTS, GEM)); + public final RecipeGenerator SALVAGE_SMELTING_TO_NUGGET = register(new SalvageSmeltingRecipeGenerator(NUGGET)); + public final RecipeGenerator SALVAGE_SMELTING_TO_FRAGMENT = register(new SalvageSmeltingRecipeGenerator(FRAGMENT)); + public final RecipeGenerator SALVAGE_BLASTING_TO_NUGGET = register(new SalvageBlastingRecipeGenerator(NUGGET)); + public final RecipeGenerator SALVAGE_BLASTING_TO_FRAGMENT = register(new SalvageBlastingRecipeGenerator(FRAGMENT)); + public final RecipeGenerator WRENCH = register(new WrenchCraftingRecipeGenerator()); public final RecipeGenerator APPLE = register(new AppleCraftingRecipeGenerator()); diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/asterite_fragment_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/asterite_fragment_from_blasting.json new file mode 100644 index 000000000..a14832da9 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/asterite_fragment_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:asterite_fragment_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:asterite_fragment_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/asterite_fragment_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/asterite_fragment_from_smelting.json new file mode 100644 index 000000000..bc07522b7 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/asterite_fragment_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:asterite_fragment_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:asterite_fragment_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/bronze_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/bronze_nugget_from_blasting.json new file mode 100644 index 000000000..823ba8b01 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/bronze_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:bronze_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:bronze_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/bronze_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/bronze_nugget_from_smelting.json new file mode 100644 index 000000000..a8b2e3e82 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/bronze_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:bronze_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:bronze_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/copper_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/copper_nugget_from_blasting.json new file mode 100644 index 000000000..6b2283b45 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/copper_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:copper_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:copper_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/copper_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/copper_nugget_from_smelting.json new file mode 100644 index 000000000..9d94e81d2 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/copper_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:copper_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:copper_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/diamond_fragment_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/diamond_fragment_from_blasting.json new file mode 100644 index 000000000..a5d20fe6a --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/diamond_fragment_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:diamond_fragment_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:diamond_fragment_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/diamond_fragment_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/diamond_fragment_from_smelting.json new file mode 100644 index 000000000..8f6a9fc00 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/diamond_fragment_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:diamond_fragment_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:diamond_fragment_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/electrum_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/electrum_nugget_from_blasting.json new file mode 100644 index 000000000..bf11bb57f --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/electrum_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:electrum_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:electrum_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/electrum_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/electrum_nugget_from_smelting.json new file mode 100644 index 000000000..ff6f626c9 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/electrum_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:electrum_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:electrum_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/fools_gold_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/fools_gold_nugget_from_blasting.json new file mode 100644 index 000000000..67c70a079 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/fools_gold_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:fools_gold_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:fools_gold_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/fools_gold_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/fools_gold_nugget_from_smelting.json new file mode 100644 index 000000000..6b70bdbae --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/fools_gold_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:fools_gold_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:fools_gold_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/galaxium_fragment_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/galaxium_fragment_from_blasting.json new file mode 100644 index 000000000..8cc42953a --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/galaxium_fragment_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:galaxium_fragment_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:galaxium_fragment_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/galaxium_fragment_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/galaxium_fragment_from_smelting.json new file mode 100644 index 000000000..5a7830582 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/galaxium_fragment_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:galaxium_fragment_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:galaxium_fragment_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/lead_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/lead_nugget_from_blasting.json new file mode 100644 index 000000000..ea64b510a --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/lead_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:lead_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:lead_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/lead_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/lead_nugget_from_smelting.json new file mode 100644 index 000000000..2d17278c9 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/lead_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:lead_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:lead_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/lunum_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/lunum_nugget_from_blasting.json new file mode 100644 index 000000000..0723ef843 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/lunum_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:lunum_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:lunum_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/lunum_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/lunum_nugget_from_smelting.json new file mode 100644 index 000000000..751b80d0d --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/lunum_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:lunum_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:lunum_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/meteoric_steel_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/meteoric_steel_nugget_from_blasting.json new file mode 100644 index 000000000..812e7bfae --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/meteoric_steel_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:meteoric_steel_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:meteoric_steel_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/meteoric_steel_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/meteoric_steel_nugget_from_smelting.json new file mode 100644 index 000000000..2d96c6489 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/meteoric_steel_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:meteoric_steel_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:meteoric_steel_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/metite_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/metite_nugget_from_blasting.json new file mode 100644 index 000000000..1c5424442 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/metite_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:metite_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:metite_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/metite_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/metite_nugget_from_smelting.json new file mode 100644 index 000000000..fa69d6424 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/metite_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:metite_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:metite_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/netherite_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/netherite_nugget_from_blasting.json new file mode 100644 index 000000000..b0e484a7d --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/netherite_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:netherite_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:netherite_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/netherite_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/netherite_nugget_from_smelting.json new file mode 100644 index 000000000..9c3d6d2bf --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/netherite_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:netherite_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:netherite_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/rose_gold_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/rose_gold_nugget_from_blasting.json new file mode 100644 index 000000000..d5f18cd94 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/rose_gold_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:rose_gold_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:rose_gold_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/rose_gold_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/rose_gold_nugget_from_smelting.json new file mode 100644 index 000000000..96ae2ec26 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/rose_gold_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:rose_gold_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:rose_gold_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/silver_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/silver_nugget_from_blasting.json new file mode 100644 index 000000000..c3ff8fc1e --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/silver_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:silver_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:silver_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/silver_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/silver_nugget_from_smelting.json new file mode 100644 index 000000000..082e53d64 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/silver_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:silver_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:silver_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/steel_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/steel_nugget_from_blasting.json new file mode 100644 index 000000000..4f01267d5 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/steel_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:steel_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:steel_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/steel_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/steel_nugget_from_smelting.json new file mode 100644 index 000000000..8cc6988cf --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/steel_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:steel_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:steel_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/stellum_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/stellum_nugget_from_blasting.json new file mode 100644 index 000000000..dcdce8c9b --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/stellum_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:stellum_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:stellum_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/stellum_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/stellum_nugget_from_smelting.json new file mode 100644 index 000000000..66207cdea --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/stellum_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:stellum_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:stellum_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/sterling_silver_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/sterling_silver_nugget_from_blasting.json new file mode 100644 index 000000000..3a5cd47e6 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/sterling_silver_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:sterling_silver_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:sterling_silver_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/sterling_silver_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/sterling_silver_nugget_from_smelting.json new file mode 100644 index 000000000..b99173318 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/sterling_silver_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:sterling_silver_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:sterling_silver_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/tin_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/tin_nugget_from_blasting.json new file mode 100644 index 000000000..01957740c --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/tin_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:tin_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:tin_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/tin_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/tin_nugget_from_smelting.json new file mode 100644 index 000000000..549a446da --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/tin_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:tin_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:tin_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/univite_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/univite_nugget_from_blasting.json new file mode 100644 index 000000000..dcd702c0d --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/univite_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:univite_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:univite_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/univite_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/univite_nugget_from_smelting.json new file mode 100644 index 000000000..9d30f5e9d --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/astromine.foundations/univite_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:univite_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:univite_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/misc/gold_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/misc/gold_nugget_from_blasting.json new file mode 100644 index 000000000..dd6045c0c --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/misc/gold_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:gold_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:gold_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/misc/gold_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/misc/gold_nugget_from_smelting.json new file mode 100644 index 000000000..5758716a2 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/misc/gold_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:gold_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:gold_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/misc/iron_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/misc/iron_nugget_from_blasting.json new file mode 100644 index 000000000..04b492526 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/misc/iron_nugget_from_blasting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:iron_nugget_from_blasting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:iron_nugget_from_blasting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/misc/iron_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/misc/iron_nugget_from_smelting.json new file mode 100644 index 000000000..247ed1ee8 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/advancements/recipes/misc/iron_nugget_from_smelting.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "astromine:iron_nugget_from_smelting" + ] + }, + "criteria": { + "impossible": { + "trigger": "minecraft:impossible" + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "astromine:iron_nugget_from_smelting" + } + } + }, + "requirements": [ + [ + "impossible", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/asterite_fragment_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/asterite_fragment_from_blasting.json new file mode 100644 index 000000000..2303e6ef1 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/asterite_fragment_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:asterite_pickaxe" + }, + { + "item": "astromine:asterite_axe" + }, + { + "item": "astromine:asterite_shovel" + }, + { + "item": "astromine:asterite_sword" + }, + { + "item": "astromine:asterite_hoe" + }, + { + "item": "astromine:asterite_hammer" + }, + { + "item": "astromine:asterite_excavator" + }, + { + "item": "astromine:asterite_mining_tool" + }, + { + "item": "astromine:asterite_mattock" + }, + { + "item": "astromine:asterite_helmet" + }, + { + "item": "astromine:asterite_chestplate" + }, + { + "item": "astromine:asterite_leggings" + }, + { + "item": "astromine:asterite_boots" + } + ], + "result": "astromine:asterite_fragment", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/asterite_fragment_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/asterite_fragment_from_smelting.json new file mode 100644 index 000000000..9d2e1991e --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/asterite_fragment_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:asterite_pickaxe" + }, + { + "item": "astromine:asterite_axe" + }, + { + "item": "astromine:asterite_shovel" + }, + { + "item": "astromine:asterite_sword" + }, + { + "item": "astromine:asterite_hoe" + }, + { + "item": "astromine:asterite_hammer" + }, + { + "item": "astromine:asterite_excavator" + }, + { + "item": "astromine:asterite_mining_tool" + }, + { + "item": "astromine:asterite_mattock" + }, + { + "item": "astromine:asterite_helmet" + }, + { + "item": "astromine:asterite_chestplate" + }, + { + "item": "astromine:asterite_leggings" + }, + { + "item": "astromine:asterite_boots" + } + ], + "result": "astromine:asterite_fragment", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/bronze_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/bronze_nugget_from_blasting.json new file mode 100644 index 000000000..30b67fe1a --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/bronze_nugget_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:bronze_pickaxe" + }, + { + "item": "astromine:bronze_axe" + }, + { + "item": "astromine:bronze_shovel" + }, + { + "item": "astromine:bronze_sword" + }, + { + "item": "astromine:bronze_hoe" + }, + { + "item": "astromine:bronze_hammer" + }, + { + "item": "astromine:bronze_excavator" + }, + { + "item": "astromine:bronze_mining_tool" + }, + { + "item": "astromine:bronze_mattock" + }, + { + "item": "astromine:bronze_helmet" + }, + { + "item": "astromine:bronze_chestplate" + }, + { + "item": "astromine:bronze_leggings" + }, + { + "item": "astromine:bronze_boots" + } + ], + "result": "astromine:bronze_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/bronze_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/bronze_nugget_from_smelting.json new file mode 100644 index 000000000..aba6bdefd --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/bronze_nugget_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:bronze_pickaxe" + }, + { + "item": "astromine:bronze_axe" + }, + { + "item": "astromine:bronze_shovel" + }, + { + "item": "astromine:bronze_sword" + }, + { + "item": "astromine:bronze_hoe" + }, + { + "item": "astromine:bronze_hammer" + }, + { + "item": "astromine:bronze_excavator" + }, + { + "item": "astromine:bronze_mining_tool" + }, + { + "item": "astromine:bronze_mattock" + }, + { + "item": "astromine:bronze_helmet" + }, + { + "item": "astromine:bronze_chestplate" + }, + { + "item": "astromine:bronze_leggings" + }, + { + "item": "astromine:bronze_boots" + } + ], + "result": "astromine:bronze_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/copper_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/copper_nugget_from_blasting.json new file mode 100644 index 000000000..ca5a587d0 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/copper_nugget_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:copper_pickaxe" + }, + { + "item": "astromine:copper_axe" + }, + { + "item": "astromine:copper_shovel" + }, + { + "item": "astromine:copper_sword" + }, + { + "item": "astromine:copper_hoe" + }, + { + "item": "astromine:copper_hammer" + }, + { + "item": "astromine:copper_excavator" + }, + { + "item": "astromine:copper_mining_tool" + }, + { + "item": "astromine:copper_mattock" + }, + { + "item": "astromine:copper_helmet" + }, + { + "item": "astromine:copper_chestplate" + }, + { + "item": "astromine:copper_leggings" + }, + { + "item": "astromine:copper_boots" + } + ], + "result": "astromine:copper_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/copper_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/copper_nugget_from_smelting.json new file mode 100644 index 000000000..26f6c7175 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/copper_nugget_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:copper_pickaxe" + }, + { + "item": "astromine:copper_axe" + }, + { + "item": "astromine:copper_shovel" + }, + { + "item": "astromine:copper_sword" + }, + { + "item": "astromine:copper_hoe" + }, + { + "item": "astromine:copper_hammer" + }, + { + "item": "astromine:copper_excavator" + }, + { + "item": "astromine:copper_mining_tool" + }, + { + "item": "astromine:copper_mattock" + }, + { + "item": "astromine:copper_helmet" + }, + { + "item": "astromine:copper_chestplate" + }, + { + "item": "astromine:copper_leggings" + }, + { + "item": "astromine:copper_boots" + } + ], + "result": "astromine:copper_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/diamond_fragment_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/diamond_fragment_from_blasting.json new file mode 100644 index 000000000..18575050a --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/diamond_fragment_from_blasting.json @@ -0,0 +1,41 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "minecraft:diamond_pickaxe" + }, + { + "item": "minecraft:diamond_axe" + }, + { + "item": "minecraft:diamond_shovel" + }, + { + "item": "minecraft:diamond_sword" + }, + { + "item": "minecraft:diamond_hoe" + }, + { + "item": "astromine:diamond_mining_tool" + }, + { + "item": "astromine:diamond_mattock" + }, + { + "item": "minecraft:diamond_helmet" + }, + { + "item": "minecraft:diamond_chestplate" + }, + { + "item": "minecraft:diamond_leggings" + }, + { + "item": "minecraft:diamond_boots" + } + ], + "result": "astromine:diamond_fragment", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/diamond_fragment_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/diamond_fragment_from_smelting.json new file mode 100644 index 000000000..20121570d --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/diamond_fragment_from_smelting.json @@ -0,0 +1,41 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "minecraft:diamond_pickaxe" + }, + { + "item": "minecraft:diamond_axe" + }, + { + "item": "minecraft:diamond_shovel" + }, + { + "item": "minecraft:diamond_sword" + }, + { + "item": "minecraft:diamond_hoe" + }, + { + "item": "astromine:diamond_mining_tool" + }, + { + "item": "astromine:diamond_mattock" + }, + { + "item": "minecraft:diamond_helmet" + }, + { + "item": "minecraft:diamond_chestplate" + }, + { + "item": "minecraft:diamond_leggings" + }, + { + "item": "minecraft:diamond_boots" + } + ], + "result": "astromine:diamond_fragment", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/electrum_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/electrum_nugget_from_blasting.json new file mode 100644 index 000000000..fd5560714 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/electrum_nugget_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:electrum_pickaxe" + }, + { + "item": "astromine:electrum_axe" + }, + { + "item": "astromine:electrum_shovel" + }, + { + "item": "astromine:electrum_sword" + }, + { + "item": "astromine:electrum_hoe" + }, + { + "item": "astromine:electrum_hammer" + }, + { + "item": "astromine:electrum_excavator" + }, + { + "item": "astromine:electrum_mining_tool" + }, + { + "item": "astromine:electrum_mattock" + }, + { + "item": "astromine:electrum_helmet" + }, + { + "item": "astromine:electrum_chestplate" + }, + { + "item": "astromine:electrum_leggings" + }, + { + "item": "astromine:electrum_boots" + } + ], + "result": "astromine:electrum_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/electrum_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/electrum_nugget_from_smelting.json new file mode 100644 index 000000000..8a19312e0 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/electrum_nugget_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:electrum_pickaxe" + }, + { + "item": "astromine:electrum_axe" + }, + { + "item": "astromine:electrum_shovel" + }, + { + "item": "astromine:electrum_sword" + }, + { + "item": "astromine:electrum_hoe" + }, + { + "item": "astromine:electrum_hammer" + }, + { + "item": "astromine:electrum_excavator" + }, + { + "item": "astromine:electrum_mining_tool" + }, + { + "item": "astromine:electrum_mattock" + }, + { + "item": "astromine:electrum_helmet" + }, + { + "item": "astromine:electrum_chestplate" + }, + { + "item": "astromine:electrum_leggings" + }, + { + "item": "astromine:electrum_boots" + } + ], + "result": "astromine:electrum_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/fools_gold_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/fools_gold_nugget_from_blasting.json new file mode 100644 index 000000000..aaafcfc19 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/fools_gold_nugget_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:fools_gold_pickaxe" + }, + { + "item": "astromine:fools_gold_axe" + }, + { + "item": "astromine:fools_gold_shovel" + }, + { + "item": "astromine:fools_gold_sword" + }, + { + "item": "astromine:fools_gold_hoe" + }, + { + "item": "astromine:fools_gold_hammer" + }, + { + "item": "astromine:fools_gold_excavator" + }, + { + "item": "astromine:fools_gold_mining_tool" + }, + { + "item": "astromine:fools_gold_mattock" + }, + { + "item": "astromine:fools_gold_helmet" + }, + { + "item": "astromine:fools_gold_chestplate" + }, + { + "item": "astromine:fools_gold_leggings" + }, + { + "item": "astromine:fools_gold_boots" + } + ], + "result": "astromine:fools_gold_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/fools_gold_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/fools_gold_nugget_from_smelting.json new file mode 100644 index 000000000..9b2080721 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/fools_gold_nugget_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:fools_gold_pickaxe" + }, + { + "item": "astromine:fools_gold_axe" + }, + { + "item": "astromine:fools_gold_shovel" + }, + { + "item": "astromine:fools_gold_sword" + }, + { + "item": "astromine:fools_gold_hoe" + }, + { + "item": "astromine:fools_gold_hammer" + }, + { + "item": "astromine:fools_gold_excavator" + }, + { + "item": "astromine:fools_gold_mining_tool" + }, + { + "item": "astromine:fools_gold_mattock" + }, + { + "item": "astromine:fools_gold_helmet" + }, + { + "item": "astromine:fools_gold_chestplate" + }, + { + "item": "astromine:fools_gold_leggings" + }, + { + "item": "astromine:fools_gold_boots" + } + ], + "result": "astromine:fools_gold_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/galaxium_fragment_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/galaxium_fragment_from_blasting.json new file mode 100644 index 000000000..87abe3469 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/galaxium_fragment_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:galaxium_pickaxe" + }, + { + "item": "astromine:galaxium_axe" + }, + { + "item": "astromine:galaxium_shovel" + }, + { + "item": "astromine:galaxium_sword" + }, + { + "item": "astromine:galaxium_hoe" + }, + { + "item": "astromine:galaxium_hammer" + }, + { + "item": "astromine:galaxium_excavator" + }, + { + "item": "astromine:galaxium_mining_tool" + }, + { + "item": "astromine:galaxium_mattock" + }, + { + "item": "astromine:galaxium_helmet" + }, + { + "item": "astromine:galaxium_chestplate" + }, + { + "item": "astromine:galaxium_leggings" + }, + { + "item": "astromine:galaxium_boots" + } + ], + "result": "astromine:galaxium_fragment", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/galaxium_fragment_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/galaxium_fragment_from_smelting.json new file mode 100644 index 000000000..2f63cb9eb --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/galaxium_fragment_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:galaxium_pickaxe" + }, + { + "item": "astromine:galaxium_axe" + }, + { + "item": "astromine:galaxium_shovel" + }, + { + "item": "astromine:galaxium_sword" + }, + { + "item": "astromine:galaxium_hoe" + }, + { + "item": "astromine:galaxium_hammer" + }, + { + "item": "astromine:galaxium_excavator" + }, + { + "item": "astromine:galaxium_mining_tool" + }, + { + "item": "astromine:galaxium_mattock" + }, + { + "item": "astromine:galaxium_helmet" + }, + { + "item": "astromine:galaxium_chestplate" + }, + { + "item": "astromine:galaxium_leggings" + }, + { + "item": "astromine:galaxium_boots" + } + ], + "result": "astromine:galaxium_fragment", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/gold_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/gold_nugget_from_blasting.json new file mode 100644 index 000000000..f72730cc9 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/gold_nugget_from_blasting.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:golden_mining_tool" + }, + { + "item": "astromine:golden_mattock" + } + ], + "result": "minecraft:gold_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/gold_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/gold_nugget_from_smelting.json new file mode 100644 index 000000000..48e66b923 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/gold_nugget_from_smelting.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:golden_mining_tool" + }, + { + "item": "astromine:golden_mattock" + } + ], + "result": "minecraft:gold_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/iron_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/iron_nugget_from_blasting.json new file mode 100644 index 000000000..dea127f20 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/iron_nugget_from_blasting.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:iron_mining_tool" + }, + { + "item": "astromine:iron_mattock" + } + ], + "result": "minecraft:iron_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/iron_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/iron_nugget_from_smelting.json new file mode 100644 index 000000000..8a7e78f64 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/iron_nugget_from_smelting.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:iron_mining_tool" + }, + { + "item": "astromine:iron_mattock" + } + ], + "result": "minecraft:iron_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/lead_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/lead_nugget_from_blasting.json new file mode 100644 index 000000000..264129e9b --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/lead_nugget_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:lead_pickaxe" + }, + { + "item": "astromine:lead_axe" + }, + { + "item": "astromine:lead_shovel" + }, + { + "item": "astromine:lead_sword" + }, + { + "item": "astromine:lead_hoe" + }, + { + "item": "astromine:lead_hammer" + }, + { + "item": "astromine:lead_excavator" + }, + { + "item": "astromine:lead_mining_tool" + }, + { + "item": "astromine:lead_mattock" + }, + { + "item": "astromine:lead_helmet" + }, + { + "item": "astromine:lead_chestplate" + }, + { + "item": "astromine:lead_leggings" + }, + { + "item": "astromine:lead_boots" + } + ], + "result": "astromine:lead_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/lead_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/lead_nugget_from_smelting.json new file mode 100644 index 000000000..1d9e985d2 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/lead_nugget_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:lead_pickaxe" + }, + { + "item": "astromine:lead_axe" + }, + { + "item": "astromine:lead_shovel" + }, + { + "item": "astromine:lead_sword" + }, + { + "item": "astromine:lead_hoe" + }, + { + "item": "astromine:lead_hammer" + }, + { + "item": "astromine:lead_excavator" + }, + { + "item": "astromine:lead_mining_tool" + }, + { + "item": "astromine:lead_mattock" + }, + { + "item": "astromine:lead_helmet" + }, + { + "item": "astromine:lead_chestplate" + }, + { + "item": "astromine:lead_leggings" + }, + { + "item": "astromine:lead_boots" + } + ], + "result": "astromine:lead_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/lunum_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/lunum_nugget_from_blasting.json new file mode 100644 index 000000000..6d2510d77 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/lunum_nugget_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:lunum_pickaxe" + }, + { + "item": "astromine:lunum_axe" + }, + { + "item": "astromine:lunum_shovel" + }, + { + "item": "astromine:lunum_sword" + }, + { + "item": "astromine:lunum_hoe" + }, + { + "item": "astromine:lunum_hammer" + }, + { + "item": "astromine:lunum_excavator" + }, + { + "item": "astromine:lunum_mining_tool" + }, + { + "item": "astromine:lunum_mattock" + }, + { + "item": "astromine:lunum_helmet" + }, + { + "item": "astromine:lunum_chestplate" + }, + { + "item": "astromine:lunum_leggings" + }, + { + "item": "astromine:lunum_boots" + } + ], + "result": "astromine:lunum_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/lunum_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/lunum_nugget_from_smelting.json new file mode 100644 index 000000000..bbc6631e2 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/lunum_nugget_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:lunum_pickaxe" + }, + { + "item": "astromine:lunum_axe" + }, + { + "item": "astromine:lunum_shovel" + }, + { + "item": "astromine:lunum_sword" + }, + { + "item": "astromine:lunum_hoe" + }, + { + "item": "astromine:lunum_hammer" + }, + { + "item": "astromine:lunum_excavator" + }, + { + "item": "astromine:lunum_mining_tool" + }, + { + "item": "astromine:lunum_mattock" + }, + { + "item": "astromine:lunum_helmet" + }, + { + "item": "astromine:lunum_chestplate" + }, + { + "item": "astromine:lunum_leggings" + }, + { + "item": "astromine:lunum_boots" + } + ], + "result": "astromine:lunum_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/meteoric_steel_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/meteoric_steel_nugget_from_blasting.json new file mode 100644 index 000000000..91d88d052 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/meteoric_steel_nugget_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:meteoric_steel_pickaxe" + }, + { + "item": "astromine:meteoric_steel_axe" + }, + { + "item": "astromine:meteoric_steel_shovel" + }, + { + "item": "astromine:meteoric_steel_sword" + }, + { + "item": "astromine:meteoric_steel_hoe" + }, + { + "item": "astromine:meteoric_steel_hammer" + }, + { + "item": "astromine:meteoric_steel_excavator" + }, + { + "item": "astromine:meteoric_steel_mining_tool" + }, + { + "item": "astromine:meteoric_steel_mattock" + }, + { + "item": "astromine:meteoric_steel_helmet" + }, + { + "item": "astromine:meteoric_steel_chestplate" + }, + { + "item": "astromine:meteoric_steel_leggings" + }, + { + "item": "astromine:meteoric_steel_boots" + } + ], + "result": "astromine:meteoric_steel_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/meteoric_steel_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/meteoric_steel_nugget_from_smelting.json new file mode 100644 index 000000000..f6021dd64 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/meteoric_steel_nugget_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:meteoric_steel_pickaxe" + }, + { + "item": "astromine:meteoric_steel_axe" + }, + { + "item": "astromine:meteoric_steel_shovel" + }, + { + "item": "astromine:meteoric_steel_sword" + }, + { + "item": "astromine:meteoric_steel_hoe" + }, + { + "item": "astromine:meteoric_steel_hammer" + }, + { + "item": "astromine:meteoric_steel_excavator" + }, + { + "item": "astromine:meteoric_steel_mining_tool" + }, + { + "item": "astromine:meteoric_steel_mattock" + }, + { + "item": "astromine:meteoric_steel_helmet" + }, + { + "item": "astromine:meteoric_steel_chestplate" + }, + { + "item": "astromine:meteoric_steel_leggings" + }, + { + "item": "astromine:meteoric_steel_boots" + } + ], + "result": "astromine:meteoric_steel_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/metite_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/metite_nugget_from_blasting.json new file mode 100644 index 000000000..563c224ac --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/metite_nugget_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:metite_pickaxe" + }, + { + "item": "astromine:metite_axe" + }, + { + "item": "astromine:metite_shovel" + }, + { + "item": "astromine:metite_sword" + }, + { + "item": "astromine:metite_hoe" + }, + { + "item": "astromine:metite_hammer" + }, + { + "item": "astromine:metite_excavator" + }, + { + "item": "astromine:metite_mining_tool" + }, + { + "item": "astromine:metite_mattock" + }, + { + "item": "astromine:metite_helmet" + }, + { + "item": "astromine:metite_chestplate" + }, + { + "item": "astromine:metite_leggings" + }, + { + "item": "astromine:metite_boots" + } + ], + "result": "astromine:metite_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/metite_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/metite_nugget_from_smelting.json new file mode 100644 index 000000000..030bcb716 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/metite_nugget_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:metite_pickaxe" + }, + { + "item": "astromine:metite_axe" + }, + { + "item": "astromine:metite_shovel" + }, + { + "item": "astromine:metite_sword" + }, + { + "item": "astromine:metite_hoe" + }, + { + "item": "astromine:metite_hammer" + }, + { + "item": "astromine:metite_excavator" + }, + { + "item": "astromine:metite_mining_tool" + }, + { + "item": "astromine:metite_mattock" + }, + { + "item": "astromine:metite_helmet" + }, + { + "item": "astromine:metite_chestplate" + }, + { + "item": "astromine:metite_leggings" + }, + { + "item": "astromine:metite_boots" + } + ], + "result": "astromine:metite_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/netherite_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/netherite_nugget_from_blasting.json new file mode 100644 index 000000000..e5ca644c5 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/netherite_nugget_from_blasting.json @@ -0,0 +1,41 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "minecraft:netherite_pickaxe" + }, + { + "item": "minecraft:netherite_axe" + }, + { + "item": "minecraft:netherite_shovel" + }, + { + "item": "minecraft:netherite_sword" + }, + { + "item": "minecraft:netherite_hoe" + }, + { + "item": "astromine:netherite_mining_tool" + }, + { + "item": "astromine:netherite_mattock" + }, + { + "item": "minecraft:netherite_helmet" + }, + { + "item": "minecraft:netherite_chestplate" + }, + { + "item": "minecraft:netherite_leggings" + }, + { + "item": "minecraft:netherite_boots" + } + ], + "result": "astromine:netherite_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/netherite_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/netherite_nugget_from_smelting.json new file mode 100644 index 000000000..89776af82 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/netherite_nugget_from_smelting.json @@ -0,0 +1,41 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "minecraft:netherite_pickaxe" + }, + { + "item": "minecraft:netherite_axe" + }, + { + "item": "minecraft:netherite_shovel" + }, + { + "item": "minecraft:netherite_sword" + }, + { + "item": "minecraft:netherite_hoe" + }, + { + "item": "astromine:netherite_mining_tool" + }, + { + "item": "astromine:netherite_mattock" + }, + { + "item": "minecraft:netherite_helmet" + }, + { + "item": "minecraft:netherite_chestplate" + }, + { + "item": "minecraft:netherite_leggings" + }, + { + "item": "minecraft:netherite_boots" + } + ], + "result": "astromine:netherite_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/rose_gold_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/rose_gold_nugget_from_blasting.json new file mode 100644 index 000000000..63014ed26 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/rose_gold_nugget_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:rose_gold_pickaxe" + }, + { + "item": "astromine:rose_gold_axe" + }, + { + "item": "astromine:rose_gold_shovel" + }, + { + "item": "astromine:rose_gold_sword" + }, + { + "item": "astromine:rose_gold_hoe" + }, + { + "item": "astromine:rose_gold_hammer" + }, + { + "item": "astromine:rose_gold_excavator" + }, + { + "item": "astromine:rose_gold_mining_tool" + }, + { + "item": "astromine:rose_gold_mattock" + }, + { + "item": "astromine:rose_gold_helmet" + }, + { + "item": "astromine:rose_gold_chestplate" + }, + { + "item": "astromine:rose_gold_leggings" + }, + { + "item": "astromine:rose_gold_boots" + } + ], + "result": "astromine:rose_gold_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/rose_gold_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/rose_gold_nugget_from_smelting.json new file mode 100644 index 000000000..41968936c --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/rose_gold_nugget_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:rose_gold_pickaxe" + }, + { + "item": "astromine:rose_gold_axe" + }, + { + "item": "astromine:rose_gold_shovel" + }, + { + "item": "astromine:rose_gold_sword" + }, + { + "item": "astromine:rose_gold_hoe" + }, + { + "item": "astromine:rose_gold_hammer" + }, + { + "item": "astromine:rose_gold_excavator" + }, + { + "item": "astromine:rose_gold_mining_tool" + }, + { + "item": "astromine:rose_gold_mattock" + }, + { + "item": "astromine:rose_gold_helmet" + }, + { + "item": "astromine:rose_gold_chestplate" + }, + { + "item": "astromine:rose_gold_leggings" + }, + { + "item": "astromine:rose_gold_boots" + } + ], + "result": "astromine:rose_gold_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/silver_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/silver_nugget_from_blasting.json new file mode 100644 index 000000000..0ecbbb3fd --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/silver_nugget_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:silver_pickaxe" + }, + { + "item": "astromine:silver_axe" + }, + { + "item": "astromine:silver_shovel" + }, + { + "item": "astromine:silver_sword" + }, + { + "item": "astromine:silver_hoe" + }, + { + "item": "astromine:silver_hammer" + }, + { + "item": "astromine:silver_excavator" + }, + { + "item": "astromine:silver_mining_tool" + }, + { + "item": "astromine:silver_mattock" + }, + { + "item": "astromine:silver_helmet" + }, + { + "item": "astromine:silver_chestplate" + }, + { + "item": "astromine:silver_leggings" + }, + { + "item": "astromine:silver_boots" + } + ], + "result": "astromine:silver_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/silver_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/silver_nugget_from_smelting.json new file mode 100644 index 000000000..ff47b2f20 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/silver_nugget_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:silver_pickaxe" + }, + { + "item": "astromine:silver_axe" + }, + { + "item": "astromine:silver_shovel" + }, + { + "item": "astromine:silver_sword" + }, + { + "item": "astromine:silver_hoe" + }, + { + "item": "astromine:silver_hammer" + }, + { + "item": "astromine:silver_excavator" + }, + { + "item": "astromine:silver_mining_tool" + }, + { + "item": "astromine:silver_mattock" + }, + { + "item": "astromine:silver_helmet" + }, + { + "item": "astromine:silver_chestplate" + }, + { + "item": "astromine:silver_leggings" + }, + { + "item": "astromine:silver_boots" + } + ], + "result": "astromine:silver_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/steel_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/steel_nugget_from_blasting.json new file mode 100644 index 000000000..baac620cb --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/steel_nugget_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:steel_pickaxe" + }, + { + "item": "astromine:steel_axe" + }, + { + "item": "astromine:steel_shovel" + }, + { + "item": "astromine:steel_sword" + }, + { + "item": "astromine:steel_hoe" + }, + { + "item": "astromine:steel_hammer" + }, + { + "item": "astromine:steel_excavator" + }, + { + "item": "astromine:steel_mining_tool" + }, + { + "item": "astromine:steel_mattock" + }, + { + "item": "astromine:steel_helmet" + }, + { + "item": "astromine:steel_chestplate" + }, + { + "item": "astromine:steel_leggings" + }, + { + "item": "astromine:steel_boots" + } + ], + "result": "astromine:steel_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/steel_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/steel_nugget_from_smelting.json new file mode 100644 index 000000000..8298d5822 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/steel_nugget_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:steel_pickaxe" + }, + { + "item": "astromine:steel_axe" + }, + { + "item": "astromine:steel_shovel" + }, + { + "item": "astromine:steel_sword" + }, + { + "item": "astromine:steel_hoe" + }, + { + "item": "astromine:steel_hammer" + }, + { + "item": "astromine:steel_excavator" + }, + { + "item": "astromine:steel_mining_tool" + }, + { + "item": "astromine:steel_mattock" + }, + { + "item": "astromine:steel_helmet" + }, + { + "item": "astromine:steel_chestplate" + }, + { + "item": "astromine:steel_leggings" + }, + { + "item": "astromine:steel_boots" + } + ], + "result": "astromine:steel_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/stellum_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/stellum_nugget_from_blasting.json new file mode 100644 index 000000000..4c3a9a0b3 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/stellum_nugget_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:stellum_pickaxe" + }, + { + "item": "astromine:stellum_axe" + }, + { + "item": "astromine:stellum_shovel" + }, + { + "item": "astromine:stellum_sword" + }, + { + "item": "astromine:stellum_hoe" + }, + { + "item": "astromine:stellum_hammer" + }, + { + "item": "astromine:stellum_excavator" + }, + { + "item": "astromine:stellum_mining_tool" + }, + { + "item": "astromine:stellum_mattock" + }, + { + "item": "astromine:stellum_helmet" + }, + { + "item": "astromine:stellum_chestplate" + }, + { + "item": "astromine:stellum_leggings" + }, + { + "item": "astromine:stellum_boots" + } + ], + "result": "astromine:stellum_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/stellum_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/stellum_nugget_from_smelting.json new file mode 100644 index 000000000..fb52bed9a --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/stellum_nugget_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:stellum_pickaxe" + }, + { + "item": "astromine:stellum_axe" + }, + { + "item": "astromine:stellum_shovel" + }, + { + "item": "astromine:stellum_sword" + }, + { + "item": "astromine:stellum_hoe" + }, + { + "item": "astromine:stellum_hammer" + }, + { + "item": "astromine:stellum_excavator" + }, + { + "item": "astromine:stellum_mining_tool" + }, + { + "item": "astromine:stellum_mattock" + }, + { + "item": "astromine:stellum_helmet" + }, + { + "item": "astromine:stellum_chestplate" + }, + { + "item": "astromine:stellum_leggings" + }, + { + "item": "astromine:stellum_boots" + } + ], + "result": "astromine:stellum_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/sterling_silver_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/sterling_silver_nugget_from_blasting.json new file mode 100644 index 000000000..9a3bfaf6c --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/sterling_silver_nugget_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:sterling_silver_pickaxe" + }, + { + "item": "astromine:sterling_silver_axe" + }, + { + "item": "astromine:sterling_silver_shovel" + }, + { + "item": "astromine:sterling_silver_sword" + }, + { + "item": "astromine:sterling_silver_hoe" + }, + { + "item": "astromine:sterling_silver_hammer" + }, + { + "item": "astromine:sterling_silver_excavator" + }, + { + "item": "astromine:sterling_silver_mining_tool" + }, + { + "item": "astromine:sterling_silver_mattock" + }, + { + "item": "astromine:sterling_silver_helmet" + }, + { + "item": "astromine:sterling_silver_chestplate" + }, + { + "item": "astromine:sterling_silver_leggings" + }, + { + "item": "astromine:sterling_silver_boots" + } + ], + "result": "astromine:sterling_silver_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/sterling_silver_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/sterling_silver_nugget_from_smelting.json new file mode 100644 index 000000000..19af2b801 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/sterling_silver_nugget_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:sterling_silver_pickaxe" + }, + { + "item": "astromine:sterling_silver_axe" + }, + { + "item": "astromine:sterling_silver_shovel" + }, + { + "item": "astromine:sterling_silver_sword" + }, + { + "item": "astromine:sterling_silver_hoe" + }, + { + "item": "astromine:sterling_silver_hammer" + }, + { + "item": "astromine:sterling_silver_excavator" + }, + { + "item": "astromine:sterling_silver_mining_tool" + }, + { + "item": "astromine:sterling_silver_mattock" + }, + { + "item": "astromine:sterling_silver_helmet" + }, + { + "item": "astromine:sterling_silver_chestplate" + }, + { + "item": "astromine:sterling_silver_leggings" + }, + { + "item": "astromine:sterling_silver_boots" + } + ], + "result": "astromine:sterling_silver_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/tin_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/tin_nugget_from_blasting.json new file mode 100644 index 000000000..93fb97d65 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/tin_nugget_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:tin_pickaxe" + }, + { + "item": "astromine:tin_axe" + }, + { + "item": "astromine:tin_shovel" + }, + { + "item": "astromine:tin_sword" + }, + { + "item": "astromine:tin_hoe" + }, + { + "item": "astromine:tin_hammer" + }, + { + "item": "astromine:tin_excavator" + }, + { + "item": "astromine:tin_mining_tool" + }, + { + "item": "astromine:tin_mattock" + }, + { + "item": "astromine:tin_helmet" + }, + { + "item": "astromine:tin_chestplate" + }, + { + "item": "astromine:tin_leggings" + }, + { + "item": "astromine:tin_boots" + } + ], + "result": "astromine:tin_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/tin_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/tin_nugget_from_smelting.json new file mode 100644 index 000000000..215254729 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/tin_nugget_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:tin_pickaxe" + }, + { + "item": "astromine:tin_axe" + }, + { + "item": "astromine:tin_shovel" + }, + { + "item": "astromine:tin_sword" + }, + { + "item": "astromine:tin_hoe" + }, + { + "item": "astromine:tin_hammer" + }, + { + "item": "astromine:tin_excavator" + }, + { + "item": "astromine:tin_mining_tool" + }, + { + "item": "astromine:tin_mattock" + }, + { + "item": "astromine:tin_helmet" + }, + { + "item": "astromine:tin_chestplate" + }, + { + "item": "astromine:tin_leggings" + }, + { + "item": "astromine:tin_boots" + } + ], + "result": "astromine:tin_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/univite_nugget_from_blasting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/univite_nugget_from_blasting.json new file mode 100644 index 000000000..426319bd4 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/univite_nugget_from_blasting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:blasting", + "ingredient": [ + { + "item": "astromine:univite_pickaxe" + }, + { + "item": "astromine:univite_axe" + }, + { + "item": "astromine:univite_shovel" + }, + { + "item": "astromine:univite_sword" + }, + { + "item": "astromine:univite_hoe" + }, + { + "item": "astromine:univite_hammer" + }, + { + "item": "astromine:univite_excavator" + }, + { + "item": "astromine:univite_mining_tool" + }, + { + "item": "astromine:univite_mattock" + }, + { + "item": "astromine:univite_helmet" + }, + { + "item": "astromine:univite_chestplate" + }, + { + "item": "astromine:univite_leggings" + }, + { + "item": "astromine:univite_boots" + } + ], + "result": "astromine:univite_nugget", + "experience": 0.1, + "cookingtime": 100 +} \ No newline at end of file diff --git a/astromine-foundations/src/generated/resources/data/astromine/recipes/univite_nugget_from_smelting.json b/astromine-foundations/src/generated/resources/data/astromine/recipes/univite_nugget_from_smelting.json new file mode 100644 index 000000000..a796887d0 --- /dev/null +++ b/astromine-foundations/src/generated/resources/data/astromine/recipes/univite_nugget_from_smelting.json @@ -0,0 +1,47 @@ +{ + "type": "minecraft:smelting", + "ingredient": [ + { + "item": "astromine:univite_pickaxe" + }, + { + "item": "astromine:univite_axe" + }, + { + "item": "astromine:univite_shovel" + }, + { + "item": "astromine:univite_sword" + }, + { + "item": "astromine:univite_hoe" + }, + { + "item": "astromine:univite_hammer" + }, + { + "item": "astromine:univite_excavator" + }, + { + "item": "astromine:univite_mining_tool" + }, + { + "item": "astromine:univite_mattock" + }, + { + "item": "astromine:univite_helmet" + }, + { + "item": "astromine:univite_chestplate" + }, + { + "item": "astromine:univite_leggings" + }, + { + "item": "astromine:univite_boots" + } + ], + "result": "astromine:univite_nugget", + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/astromine-foundations/src/main/java/com/github/chainmailstudios/astromine/foundations/common/item/FireExtinguisherItem.java b/astromine-foundations/src/main/java/com/github/chainmailstudios/astromine/foundations/common/item/FireExtinguisherItem.java index 2c8d951c3..f89e4431c 100644 --- a/astromine-foundations/src/main/java/com/github/chainmailstudios/astromine/foundations/common/item/FireExtinguisherItem.java +++ b/astromine-foundations/src/main/java/com/github/chainmailstudios/astromine/foundations/common/item/FireExtinguisherItem.java @@ -89,7 +89,7 @@ public TypedActionResult use(World world, PlayerEntity user, Hand han BlockHitResult result = (BlockHitResult) user.raycast(6, 0, false); - BlockPos.Mutable.method_29715(new Box(result.getBlockPos()).expand(2)).forEach(position -> { + BlockPos.Mutable.stream(new Box(result.getBlockPos()).expand(2)).forEach(position -> { BlockState state = world.getBlockState(position); if (state.getBlock() instanceof FireBlock) { diff --git a/astromine-foundations/src/main/java/com/github/chainmailstudios/astromine/foundations/common/world/feature/CrudeOilFeature.java b/astromine-foundations/src/main/java/com/github/chainmailstudios/astromine/foundations/common/world/feature/CrudeOilFeature.java index 8a88ab882..362e97aa3 100644 --- a/astromine-foundations/src/main/java/com/github/chainmailstudios/astromine/foundations/common/world/feature/CrudeOilFeature.java +++ b/astromine-foundations/src/main/java/com/github/chainmailstudios/astromine/foundations/common/world/feature/CrudeOilFeature.java @@ -55,7 +55,7 @@ public CrudeOilFeature(Codec configCodec) { @Override public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random random, BlockPos pos, DefaultFeatureConfig config) { - if (random.nextInt(500) > 1) + if (random.nextInt(1000) > 1) return false; int offsetY = MathHelper.clamp(random.nextInt(20), 8, 20); diff --git a/astromine-foundations/src/main/java/com/github/chainmailstudios/astromine/foundations/registry/AstromineFoundationsItems.java b/astromine-foundations/src/main/java/com/github/chainmailstudios/astromine/foundations/registry/AstromineFoundationsItems.java index 2fe19dbbf..400bb7269 100644 --- a/astromine-foundations/src/main/java/com/github/chainmailstudios/astromine/foundations/registry/AstromineFoundationsItems.java +++ b/astromine-foundations/src/main/java/com/github/chainmailstudios/astromine/foundations/registry/AstromineFoundationsItems.java @@ -24,6 +24,8 @@ package com.github.chainmailstudios.astromine.foundations.registry; +import net.fabricmc.fabric.impl.content.registry.FuelRegistryImpl; + import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.effect.StatusEffectInstance; import net.minecraft.entity.effect.StatusEffects; @@ -510,7 +512,8 @@ public static Item.Settings getBasicSettings() { } public static void initialize() { - + FuelRegistryImpl.INSTANCE.add(WOODEN_MATTOCK, 200); + FuelRegistryImpl.INSTANCE.add(WOODEN_MINING_TOOL, 200); } public static T register(String name, T item) { diff --git a/astromine-foundations/src/main/resources/assets/astromine/blockstates/kerosene-oxygen-fuel.json b/astromine-foundations/src/main/resources/assets/astromine/blockstates/kerosene_oxygen_fuel.json similarity index 100% rename from astromine-foundations/src/main/resources/assets/astromine/blockstates/kerosene-oxygen-fuel.json rename to astromine-foundations/src/main/resources/assets/astromine/blockstates/kerosene_oxygen_fuel.json diff --git a/astromine-foundations/src/main/resources/data/c/tags/fluids/butane.json b/astromine-foundations/src/main/resources/data/c/tags/fluids/butane.json new file mode 100644 index 000000000..a09ba4864 --- /dev/null +++ b/astromine-foundations/src/main/resources/data/c/tags/fluids/butane.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "astromine:butane", + "astromine:butane_flowing" + ] +} diff --git a/astromine-foundations/src/main/resources/data/c/tags/fluids/crude_oil.json b/astromine-foundations/src/main/resources/data/c/tags/fluids/crude_oil.json new file mode 100644 index 000000000..beb8dc6d5 --- /dev/null +++ b/astromine-foundations/src/main/resources/data/c/tags/fluids/crude_oil.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "astromine:crude_oil", + "astromine:crude_oil_flowing" + ] +} diff --git a/astromine-foundations/src/main/resources/data/c/tags/fluids/diesel.json b/astromine-foundations/src/main/resources/data/c/tags/fluids/diesel.json new file mode 100644 index 000000000..940d41009 --- /dev/null +++ b/astromine-foundations/src/main/resources/data/c/tags/fluids/diesel.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "astromine:diesel", + "astromine:diesel_flowing" + ] +} diff --git a/astromine-foundations/src/main/resources/data/c/tags/fluids/gasoline.json b/astromine-foundations/src/main/resources/data/c/tags/fluids/gasoline.json new file mode 100644 index 000000000..8e2ac7bf0 --- /dev/null +++ b/astromine-foundations/src/main/resources/data/c/tags/fluids/gasoline.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "astromine:gasoline", + "astromine:gasoline_flowing" + ] +} diff --git a/astromine-foundations/src/main/resources/data/c/tags/fluids/heavy_gas_oil.json b/astromine-foundations/src/main/resources/data/c/tags/fluids/heavy_gas_oil.json new file mode 100644 index 000000000..96093828e --- /dev/null +++ b/astromine-foundations/src/main/resources/data/c/tags/fluids/heavy_gas_oil.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "astromine:heavy_gas_oil", + "astromine:heavy_gas_oil_flowing" + ] +} diff --git a/astromine-foundations/src/main/resources/data/c/tags/fluids/hydrogen.json b/astromine-foundations/src/main/resources/data/c/tags/fluids/hydrogen.json new file mode 100644 index 000000000..1ee5ab2f8 --- /dev/null +++ b/astromine-foundations/src/main/resources/data/c/tags/fluids/hydrogen.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "astromine:hydrogen", + "astromine:hydrogen_flowing" + ] +} diff --git a/astromine-foundations/src/main/resources/data/c/tags/fluids/kerosene.json b/astromine-foundations/src/main/resources/data/c/tags/fluids/kerosene.json new file mode 100644 index 000000000..3a7f5e0d2 --- /dev/null +++ b/astromine-foundations/src/main/resources/data/c/tags/fluids/kerosene.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "astromine:kerosene", + "astromine:kerosene_flowing" + ] +} diff --git a/astromine-foundations/src/main/resources/data/c/tags/fluids/kerosene_oxygen_fuel.json b/astromine-foundations/src/main/resources/data/c/tags/fluids/kerosene_oxygen_fuel.json new file mode 100644 index 000000000..7ebec0116 --- /dev/null +++ b/astromine-foundations/src/main/resources/data/c/tags/fluids/kerosene_oxygen_fuel.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "astromine:kerosene_oxygen_fuel", + "astromine:kerosene_oxygen_fuel_flowing" + ] +} diff --git a/astromine-foundations/src/main/resources/data/c/tags/fluids/naphtha.json b/astromine-foundations/src/main/resources/data/c/tags/fluids/naphtha.json new file mode 100644 index 000000000..160be11e8 --- /dev/null +++ b/astromine-foundations/src/main/resources/data/c/tags/fluids/naphtha.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "astromine:naphtha", + "astromine:naphtha_flowing" + ] +} diff --git a/astromine-foundations/src/main/resources/data/astromine/tags/fluids/oxygen.json b/astromine-foundations/src/main/resources/data/c/tags/fluids/oxygen.json similarity index 100% rename from astromine-foundations/src/main/resources/data/astromine/tags/fluids/oxygen.json rename to astromine-foundations/src/main/resources/data/c/tags/fluids/oxygen.json diff --git a/astromine-foundations/src/main/resources/data/c/tags/fluids/residual_fuel_oil.json b/astromine-foundations/src/main/resources/data/c/tags/fluids/residual_fuel_oil.json new file mode 100644 index 000000000..bea8e4703 --- /dev/null +++ b/astromine-foundations/src/main/resources/data/c/tags/fluids/residual_fuel_oil.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "astromine:residual_fuel_oil", + "astromine:residual_fuel_oil_flowing" + ] +} diff --git a/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/block/entity/TankBlockEntity.java b/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/block/entity/TankBlockEntity.java index f7332f690..e417786bc 100644 --- a/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/block/entity/TankBlockEntity.java +++ b/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/block/entity/TankBlockEntity.java @@ -24,8 +24,10 @@ package com.github.chainmailstudios.astromine.technologies.common.block.entity; +import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntityType; import net.minecraft.fluid.Fluid; +import net.minecraft.fluid.Fluids; import net.minecraft.item.BucketItem; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -46,6 +48,10 @@ import com.github.chainmailstudios.astromine.technologies.common.block.entity.machine.SpeedProvider; import com.github.chainmailstudios.astromine.technologies.common.block.entity.machine.TierProvider; import com.github.chainmailstudios.astromine.technologies.registry.AstromineTechnologiesBlockEntityTypes; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.util.Identifier; +import net.minecraft.util.registry.Registry; +import org.jetbrains.annotations.NotNull; import java.util.Optional; @@ -54,9 +60,14 @@ public TankBlockEntity(BlockEntityType type) { super(type); } + private Fluid filter = Fluids.EMPTY; + @Override protected FluidInventoryComponent createFluidComponent() { - FluidInventoryComponent fluidComponent = new SimpleFluidInventoryComponent(1); + FluidInventoryComponent fluidComponent = new SimpleFluidInventoryComponent(1).withInsertPredicate((direction, volume, slot) -> { + return slot == 0 && (filter == Fluids.EMPTY || volume.getFluid() == filter); + }); + FluidHandler.of(fluidComponent).getFirst().setSize(getFluidSize()); return fluidComponent; } @@ -70,76 +81,12 @@ protected ItemInventoryComponent createItemComponent() { }); } - // return true to consume bucket contents, false to not consume - private boolean handleBucketInput(FluidVolume currentTank, Fluid bucketFluid) { - if (getMachineTier() == MachineTier.CREATIVE) { - currentTank.setFluid(bucketFluid); - } else if (currentTank.canAccept(bucketFluid) && currentTank.hasAvailable(Fraction.bucket())) { - currentTank.setFluid(bucketFluid); - currentTank.add(Fraction.bucket()); - return true; - } - return false; + public Fluid getFilter() { + return filter; } - private ItemStack handleLeftItem(FluidVolume currentTank, ItemStack inputStack) { - Item inputItem = inputStack.getItem(); - if (inputItem == Items.BUCKET) - return inputStack; // Do not pull from empty buckets - if (inputStack.getCount() != 1) - return inputStack; // Do not operate on multiple items at once (per slot) - if (inputItem instanceof BucketItem) { - // Handle fluid items manually, since operations have to be exactly one Fraction.bucket() at a time. - Fluid f = ((BucketItem) inputItem).fluid; - if (handleBucketInput(currentTank, f)) - return new ItemStack(Items.BUCKET); - else return inputStack; - } - Optional opt = FluidHandler.ofOptional(inputStack); - if (!opt.isPresent()) - return inputStack; // Reject non fluid container items - FluidHandler stackFluids = opt.get(); - FluidVolume stackVolume = stackFluids.getFirst(); - if (stackVolume == null) - return inputStack; // Do not operate on null fluids - if (stackVolume.isEmpty()) - return inputStack; // Do not operate on empty fluid containers - - if (getMachineTier() == MachineTier.CREATIVE) { - // Creative tanks just copy the fluid without consuming or space checks - currentTank.setFluid(stackVolume.getFluid()); - return inputStack; - } - - // Fluid type is already checked in moveFrom - currentTank.moveFrom(stackVolume, Fraction.ofDecimal(getMachineSpeed())); - return inputStack; - } - - private ItemStack handleRightItem(FluidVolume currentTank, ItemStack outputStack) { - Item outputItem = outputStack.getItem(); - if (currentTank.isEmpty()) - return outputStack; // Do not operate if we are empty - if (outputStack.getCount() != 1) - return outputStack; // Do not operate on multiple Items - if (outputItem instanceof BucketItem) { - if (outputItem != Items.BUCKET) - return outputStack; // Do not insert into filled buckets - if (currentTank.hasStored(Fraction.bucket())) { - currentTank.minus(Fraction.bucket()); - return new ItemStack(currentTank.getFluid().getBucketItem()); - } - return outputStack; - } - Optional opt = FluidHandler.ofOptional(outputStack); - if (!opt.isPresent()) - return outputStack; // Reject non fluid container items - FluidHandler stackFluids = opt.get(); - FluidVolume stackVolume = stackFluids.getFirst(); - - stackVolume.moveFrom(currentTank, Fraction.of((long) getMachineSpeed())); - - return outputStack; + public void setFilter(Fluid filter) { + this.filter = filter; } @Override @@ -194,6 +141,19 @@ public void tick() { }); } + @Override + public CompoundTag toTag(CompoundTag tag) { + tag.putString("fluid", Registry.FLUID.getId(filter).toString()); + return super.toTag(tag); + } + + @Override + public void fromTag(BlockState state, @NotNull CompoundTag tag) { + Registry.FLUID.getOrEmpty(new Identifier(tag.getString("fluid"))).ifPresent(filter -> this.filter = filter); + + super.fromTag(state, tag); + } + public static class Primitive extends TankBlockEntity { public Primitive() { super(AstromineTechnologiesBlockEntityTypes.PRIMITIVE_TANK); diff --git a/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/screenhandler/ElectrolyzerScreenHandler.java b/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/screenhandler/ElectrolyzerScreenHandler.java index e5579dc57..83733227e 100644 --- a/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/screenhandler/ElectrolyzerScreenHandler.java +++ b/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/screenhandler/ElectrolyzerScreenHandler.java @@ -27,7 +27,6 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.math.BlockPos; -import com.github.chainmailstudios.astromine.common.component.SidedComponentProvider; import com.github.chainmailstudios.astromine.common.screenhandler.base.block.ComponentBlockEntityEnergyFluidScreenHandler; import com.github.chainmailstudios.astromine.common.widget.blade.FluidVerticalBarWidget; import com.github.chainmailstudios.astromine.common.widget.blade.HorizontalArrowWidget; @@ -50,16 +49,14 @@ public ElectrolyzerScreenHandler(int syncId, PlayerEntity player, BlockPos posit public void initialize(int width, int height) { super.initialize(width, height); - SidedComponentProvider sidedComponentProvider = blockEntity; - FluidVerticalBarWidget firstOutputFluidBar = new FluidVerticalBarWidget(); firstOutputFluidBar.setSize(Size.absolute(fluidBar)); - firstOutputFluidBar.setVolume(() -> sidedComponentProvider.getSidedComponent(null, AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(1)); + firstOutputFluidBar.setVolume(() -> blockEntity.getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(1)); FluidVerticalBarWidget secondOutputFluidBar = new FluidVerticalBarWidget(); secondOutputFluidBar.setSize(Size.absolute(fluidBar)); - secondOutputFluidBar.setVolume(() -> sidedComponentProvider.getSidedComponent(null, AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(2)); + secondOutputFluidBar.setVolume(() -> blockEntity.getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(2)); HorizontalArrowWidget arrow = new HorizontalArrowWidget(); arrow.setPosition(Position.of(fluidBar, fluidBar.getWidth() + 7, fluidBar.getHeight() / 2 - 8)); diff --git a/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/screenhandler/FluidMixerScreenHandler.java b/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/screenhandler/FluidMixerScreenHandler.java index 2a1d4a0e5..555ea075f 100644 --- a/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/screenhandler/FluidMixerScreenHandler.java +++ b/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/screenhandler/FluidMixerScreenHandler.java @@ -24,10 +24,10 @@ package com.github.chainmailstudios.astromine.technologies.common.screenhandler; +import nerdhub.cardinal.components.api.component.ComponentProvider; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.math.BlockPos; -import com.github.chainmailstudios.astromine.common.component.SidedComponentProvider; import com.github.chainmailstudios.astromine.common.screenhandler.base.block.ComponentBlockEntityEnergyFluidScreenHandler; import com.github.chainmailstudios.astromine.common.widget.blade.FluidVerticalBarWidget; import com.github.chainmailstudios.astromine.common.widget.blade.HorizontalArrowWidget; @@ -50,12 +50,10 @@ public FluidMixerScreenHandler(int syncId, PlayerEntity player, BlockPos positio public void initialize(int width, int height) { super.initialize(width, height); - SidedComponentProvider sidedComponentProvider = blockEntity; - FluidVerticalBarWidget secondInputFluidBar = new FluidVerticalBarWidget(); secondInputFluidBar.setPosition(Position.of(fluidBar, fluidBar.getWidth() + 7, 0)); secondInputFluidBar.setSize(Size.absolute(fluidBar)); - secondInputFluidBar.setVolume(() -> sidedComponentProvider.getSidedComponent(null, AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(1)); + secondInputFluidBar.setVolume(() -> blockEntity.getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(1)); HorizontalArrowWidget arrow = new HorizontalArrowWidget(); arrow.setPosition(Position.of(secondInputFluidBar, secondInputFluidBar.getWidth() + 9, secondInputFluidBar.getHeight() / 2F - 8)); @@ -66,7 +64,7 @@ public void initialize(int width, int height) { FluidVerticalBarWidget outputFluidBar = new FluidVerticalBarWidget(); outputFluidBar.setPosition(Position.of(secondInputFluidBar, secondInputFluidBar.getWidth() + 9 + arrow.getWidth() + 7, 0)); outputFluidBar.setSize(Size.absolute(fluidBar)); - outputFluidBar.setVolume(() -> sidedComponentProvider.getSidedComponent(null, AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(2)); + outputFluidBar.setVolume(() -> blockEntity.getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(2)); mainTab.addWidget(secondInputFluidBar); mainTab.addWidget(arrow); diff --git a/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/screenhandler/RefineryScreenHandler.java b/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/screenhandler/RefineryScreenHandler.java index cca95de86..325a17c9b 100644 --- a/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/screenhandler/RefineryScreenHandler.java +++ b/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/screenhandler/RefineryScreenHandler.java @@ -27,7 +27,6 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.math.BlockPos; -import com.github.chainmailstudios.astromine.common.component.SidedComponentProvider; import com.github.chainmailstudios.astromine.common.screenhandler.base.block.ComponentBlockEntityEnergyFluidScreenHandler; import com.github.chainmailstudios.astromine.common.widget.blade.FluidVerticalBarWidget; import com.github.chainmailstudios.astromine.common.widget.blade.HorizontalArrowWidget; @@ -60,35 +59,33 @@ public Position getTabsPosition(int width, int height) { public void initialize(int width, int height) { super.initialize(width, height); - SidedComponentProvider sidedComponentProvider = blockEntity; - FluidVerticalBarWidget firstOutputFluidBar = new FluidVerticalBarWidget(); firstOutputFluidBar.setSize(Size.absolute(fluidBar)); - firstOutputFluidBar.setVolume(() -> sidedComponentProvider.getSidedComponent(null, AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(1)); + firstOutputFluidBar.setVolume(() -> blockEntity.getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(1)); FluidVerticalBarWidget secondOutputFluidBar = new FluidVerticalBarWidget(); secondOutputFluidBar.setSize(Size.absolute(fluidBar)); - secondOutputFluidBar.setVolume(() -> sidedComponentProvider.getSidedComponent(null, AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(2)); + secondOutputFluidBar.setVolume(() -> blockEntity.getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(2)); FluidVerticalBarWidget thirdOutputFluidBar = new FluidVerticalBarWidget(); thirdOutputFluidBar.setSize(Size.absolute(fluidBar)); - thirdOutputFluidBar.setVolume(() -> sidedComponentProvider.getSidedComponent(null, AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(3)); + thirdOutputFluidBar.setVolume(() -> blockEntity.getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(3)); FluidVerticalBarWidget fourthOutputFluidBar = new FluidVerticalBarWidget(); fourthOutputFluidBar.setSize(Size.absolute(fluidBar)); - fourthOutputFluidBar.setVolume(() -> sidedComponentProvider.getSidedComponent(null, AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(4)); + fourthOutputFluidBar.setVolume(() -> blockEntity.getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(4)); FluidVerticalBarWidget fifthOutputFluidBar = new FluidVerticalBarWidget(); fifthOutputFluidBar.setSize(Size.absolute(fluidBar)); - fifthOutputFluidBar.setVolume(() -> sidedComponentProvider.getSidedComponent(null, AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(5)); + fifthOutputFluidBar.setVolume(() -> blockEntity.getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(5)); FluidVerticalBarWidget sixthOutputFluidBar = new FluidVerticalBarWidget(); sixthOutputFluidBar.setSize(Size.absolute(fluidBar)); - sixthOutputFluidBar.setVolume(() -> sidedComponentProvider.getSidedComponent(null, AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(6)); + sixthOutputFluidBar.setVolume(() -> blockEntity.getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(6)); FluidVerticalBarWidget seventhOutputFluidBar = new FluidVerticalBarWidget(); seventhOutputFluidBar.setSize(Size.absolute(fluidBar)); - seventhOutputFluidBar.setVolume(() -> sidedComponentProvider.getSidedComponent(null, AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(7)); + seventhOutputFluidBar.setVolume(() -> blockEntity.getComponent(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).getVolume(7)); HorizontalArrowWidget arrow = new HorizontalArrowWidget(); arrow.setPosition(Position.of(fluidBar, fluidBar.getWidth() + 7, fluidBar.getHeight() / 2 - 8)); diff --git a/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/screenhandler/TankScreenHandler.java b/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/screenhandler/TankScreenHandler.java index 9d5364af5..4caa06b42 100644 --- a/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/screenhandler/TankScreenHandler.java +++ b/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/common/screenhandler/TankScreenHandler.java @@ -24,6 +24,8 @@ package com.github.chainmailstudios.astromine.technologies.common.screenhandler; +import com.github.chainmailstudios.astromine.common.widget.blade.FluidFilterWidget; +import com.github.chainmailstudios.astromine.technologies.common.block.entity.TankBlockEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.screen.ScreenHandlerType; @@ -42,12 +44,16 @@ import nerdhub.cardinal.components.api.component.ComponentProvider; public class TankScreenHandler extends ComponentBlockEntityFluidInventoryScreenHandler { + private TankBlockEntity tank; + public TankScreenHandler(int syncId, PlayerEntity player, BlockPos position) { super(AstromineTechnologiesScreenHandlers.TANK, syncId, player, position); + tank = (TankBlockEntity) blockEntity; } public TankScreenHandler(ScreenHandlerType type, int syncId, PlayerEntity player, BlockPos position) { super(type, syncId, player, position); + tank = (TankBlockEntity) blockEntity; } @Override @@ -96,9 +102,18 @@ public void initialize(int width, int height) { } }); + FluidFilterWidget filter = new FluidFilterWidget(); + filter.setPosition(Position.of(input, 5, -9 - 5)); + filter.setSize(Size.of(8, 8)); + filter.setFluidConsumer(fluid -> { + tank.setFilter(fluid); + }); + filter.setFluidSupplier(() -> tank.getFilter()); + mainTab.addWidget(input); mainTab.addWidget(output); mainTab.addWidget(leftArrow); mainTab.addWidget(rightArrow); + mainTab.addWidget(filter); } } diff --git a/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/registry/AstromineTechnologiesBlocks.java b/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/registry/AstromineTechnologiesBlocks.java index 8ef86e7e9..bbdf87acd 100644 --- a/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/registry/AstromineTechnologiesBlocks.java +++ b/astromine-technologies/src/main/java/com/github/chainmailstudios/astromine/technologies/registry/AstromineTechnologiesBlocks.java @@ -104,8 +104,7 @@ public class AstromineTechnologiesBlocks extends AstromineBlocks { public static final Block BLOCK_BREAKER = register("block_breaker", new BlockBreakerBlock(getAdvancedSettings()), AstromineTechnologiesItems.getBasicSettings()); public static final Block BLOCK_PLACER = register("block_placer", new BlockPlacerBlock(getAdvancedSettings()), AstromineTechnologiesItems.getBasicSettings()); - public static final Block NUCLEAR_WARHEAD = register("nuclear_warhead", new NuclearWarheadBlock(FabricBlockSettings.of(Material.METAL).requiresTool().breakByTool(FabricToolTags.PICKAXES, 5).strength(1F, 4F).sounds(BlockSoundGroup.METAL)), AstromineTechnologiesItems - .getBasicSettings()); + public static final Block NUCLEAR_WARHEAD = register("nuclear_warhead", new NuclearWarheadBlock(FabricBlockSettings.of(Material.METAL).requiresTool().breakByTool(FabricToolTags.PICKAXES, 5).strength(1F, 4F).sounds(BlockSoundGroup.METAL)), AstromineTechnologiesItems.getBasicSettings()); public static final Block PRIMITIVE_CAPACITOR = register("primitive_capacitor", new CapacitorBlock.Primitive(getPrimitiveSettings()), AstromineTechnologiesItems.getBasicSettings()); public static final Block BASIC_CAPACITOR = register("basic_capacitor", new CapacitorBlock.Basic(getBasicSettings()), AstromineTechnologiesItems.getBasicSettings()); diff --git a/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/common/block/DrainBlock.java b/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/common/block/DrainBlock.java new file mode 100644 index 000000000..ff2dd4c26 --- /dev/null +++ b/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/common/block/DrainBlock.java @@ -0,0 +1,40 @@ +package com.github.chainmailstudios.astromine.transportations.common.block; + +import com.github.chainmailstudios.astromine.common.block.base.BlockWithEntity; +import com.github.chainmailstudios.astromine.common.block.base.HorizontalFacingBlockWithEntity; +import com.github.chainmailstudios.astromine.transportations.common.block.entity.DrainBlockEntity; +import net.minecraft.block.BlockState; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.network.PacketByteBuf; +import net.minecraft.screen.ScreenHandler; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class DrainBlock extends BlockWithEntity { + public DrainBlock(Settings settings) { + super(settings); + } + + @Override + public boolean hasScreenHandler() { + return false; + } + + @Override + public BlockEntity createBlockEntity() { + return new DrainBlockEntity(); + } + + @Override + public ScreenHandler createScreenHandler(BlockState state, World world, BlockPos pos, int syncId, PlayerInventory playerInventory, PlayerEntity player) { + return null; + } + + @Override + public void populateScreenHandlerBuffer(BlockState state, World world, BlockPos pos, ServerPlayerEntity player, PacketByteBuf buffer) { + + } +} diff --git a/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/common/block/entity/DrainBlockEntity.java b/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/common/block/entity/DrainBlockEntity.java new file mode 100644 index 000000000..081cd1236 --- /dev/null +++ b/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/common/block/entity/DrainBlockEntity.java @@ -0,0 +1,37 @@ +package com.github.chainmailstudios.astromine.transportations.common.block.entity; + +import com.github.chainmailstudios.astromine.common.block.entity.base.ComponentFluidBlockEntity; +import com.github.chainmailstudios.astromine.common.block.transfer.TransferType; +import com.github.chainmailstudios.astromine.common.component.inventory.FluidInventoryComponent; +import com.github.chainmailstudios.astromine.common.component.inventory.SimpleFluidInventoryComponent; +import com.github.chainmailstudios.astromine.common.volume.fraction.Fraction; +import com.github.chainmailstudios.astromine.common.volume.handler.FluidHandler; +import com.github.chainmailstudios.astromine.registry.AstromineComponentTypes; +import com.github.chainmailstudios.astromine.transportations.registry.AstromineTransportationsBlockEntityTypes; +import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.fluid.Fluids; +import net.minecraft.util.Tickable; +import net.minecraft.util.math.Direction; + +public class DrainBlockEntity extends ComponentFluidBlockEntity implements Tickable { + public DrainBlockEntity() { + super(AstromineTransportationsBlockEntityTypes.DRAIN); + + for (Direction direction : Direction.values()) { + transferComponent.get(AstromineComponentTypes.FLUID_INVENTORY_COMPONENT).set(direction, TransferType.INPUT); + } + } + + @Override + protected FluidInventoryComponent createFluidComponent() { + FluidInventoryComponent fluidComponent = new SimpleFluidInventoryComponent(1); + FluidHandler.of(fluidComponent).getFirst().setSize(Fraction.of(Long.MAX_VALUE)); + return fluidComponent; + } + + @Override + public void tick() { + getFluidComponent().getVolume(0).setFluid(Fluids.EMPTY); + getFluidComponent().getVolume(0).setAmount(Fraction.empty()); + } +} diff --git a/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/registry/AstromineTransportationsBlockEntityTypes.java b/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/registry/AstromineTransportationsBlockEntityTypes.java index c3fd9a5f5..eaea1ac49 100644 --- a/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/registry/AstromineTransportationsBlockEntityTypes.java +++ b/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/registry/AstromineTransportationsBlockEntityTypes.java @@ -24,16 +24,10 @@ package com.github.chainmailstudios.astromine.transportations.registry; +import com.github.chainmailstudios.astromine.transportations.common.block.entity.*; import net.minecraft.block.entity.BlockEntityType; import com.github.chainmailstudios.astromine.registry.AstromineBlockEntityTypes; -import com.github.chainmailstudios.astromine.transportations.common.block.entity.AlternatorBlockEntity; -import com.github.chainmailstudios.astromine.transportations.common.block.entity.ConveyorBlockEntity; -import com.github.chainmailstudios.astromine.transportations.common.block.entity.DownVerticalConveyorBlockEntity; -import com.github.chainmailstudios.astromine.transportations.common.block.entity.IncineratorBlockEntity; -import com.github.chainmailstudios.astromine.transportations.common.block.entity.InserterBlockEntity; -import com.github.chainmailstudios.astromine.transportations.common.block.entity.SplitterBlockEntity; -import com.github.chainmailstudios.astromine.transportations.common.block.entity.VerticalConveyorBlockEntity; import com.github.chainmailstudios.astromine.transportations.common.block.entity.base.AbstractConveyableBlockEntity; public class AstromineTransportationsBlockEntityTypes extends AstromineBlockEntityTypes { @@ -43,10 +37,10 @@ public class AstromineTransportationsBlockEntityTypes extends AstromineBlockEnti public static final BlockEntityType INSERTER = register("inserter", InserterBlockEntity::new, AstromineTransportationsBlocks.INSERTER, AstromineTransportationsBlocks.FAST_INSERTER); public static final BlockEntityType CONVEYOR = register("conveyor", ConveyorBlockEntity::new, AstromineTransportationsBlocks.BASIC_CONVEYOR, AstromineTransportationsBlocks.ADVANCED_CONVEYOR, AstromineTransportationsBlocks.ELITE_CONVEYOR); - public static final BlockEntityType VERTICAL_CONVEYOR = register("vertical_conveyor", VerticalConveyorBlockEntity::new, AstromineTransportationsBlocks.BASIC_VERTICAL_CONVEYOR, AstromineTransportationsBlocks.ADVANCED_VERTICAL_CONVEYOR, - AstromineTransportationsBlocks.ELITE_VERTICAL_CONVEYOR); - public static final BlockEntityType DOWNWARD_VERTICAL_CONVEYOR = register("downward_vertical_conveyor", DownVerticalConveyorBlockEntity::new, AstromineTransportationsBlocks.BASIC_DOWNWARD_VERTICAL_CONVEYOR, - AstromineTransportationsBlocks.ADVANCED_DOWNWARD_VERTICAL_CONVEYOR, AstromineTransportationsBlocks.ELITE_DOWNWARD_VERTICAL_CONVEYOR); + public static final BlockEntityType VERTICAL_CONVEYOR = register("vertical_conveyor", VerticalConveyorBlockEntity::new, AstromineTransportationsBlocks.BASIC_VERTICAL_CONVEYOR, AstromineTransportationsBlocks.ADVANCED_VERTICAL_CONVEYOR, AstromineTransportationsBlocks.ELITE_VERTICAL_CONVEYOR); + public static final BlockEntityType DOWNWARD_VERTICAL_CONVEYOR = register("downward_vertical_conveyor", DownVerticalConveyorBlockEntity::new, AstromineTransportationsBlocks.BASIC_DOWNWARD_VERTICAL_CONVEYOR, AstromineTransportationsBlocks.ADVANCED_DOWNWARD_VERTICAL_CONVEYOR, AstromineTransportationsBlocks.ELITE_DOWNWARD_VERTICAL_CONVEYOR); + + public static final BlockEntityType DRAIN = register("drain", DrainBlockEntity::new, AstromineTransportationsBlocks.DRAIN); public static void initialize() { diff --git a/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/registry/AstromineTransportationsBlocks.java b/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/registry/AstromineTransportationsBlocks.java index c67624d42..b8368be40 100644 --- a/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/registry/AstromineTransportationsBlocks.java +++ b/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/registry/AstromineTransportationsBlocks.java @@ -36,38 +36,34 @@ import com.github.chainmailstudios.astromine.transportations.common.block.*; public class AstromineTransportationsBlocks extends AstromineBlocks { - public static final Block ALTERNATOR = register("alternator", new AlternatorBlock(getBasicSettings()), AstromineTransportationsItems.getTransportationsBasicSettings()); - public static final Block SPLITTER = register("splitter", new SplitterBlock(getBasicSettings()), AstromineTransportationsItems.getTransportationsBasicSettings()); - public static final Block INCINERATOR = register("incinerator", new IncineratorBlock(getBasicSettings().ticksRandomly()), AstromineTransportationsItems.getTransportationsBasicSettings()); + public static final Block ALTERNATOR = register("alternator", new AlternatorBlock(getBasicSettings()), AstromineTransportationsItems.getBasicSettings()); + public static final Block SPLITTER = register("splitter", new SplitterBlock(getBasicSettings()), AstromineTransportationsItems.getBasicSettings()); + public static final Block INCINERATOR = register("incinerator", new IncineratorBlock(getBasicSettings().ticksRandomly()), AstromineTransportationsItems.getBasicSettings()); - public static final Block INSERTER = register("inserter", new InserterBlock("normal", 16, getBasicSettings().nonOpaque()), AstromineTransportationsItems.getTransportationsBasicSettings()); - public static final Block FAST_INSERTER = register("fast_inserter", new InserterBlock("fast", 8, getBasicSettings().nonOpaque()), AstromineTransportationsItems.getTransportationsBasicSettings()); + public static final Block DRAIN = register("drain", new DrainBlock(getBasicSettings()), AstromineTransportationsItems.getBasicSettings()); - public static final Block BASIC_CONVEYOR = register("basic_conveyor", new ConveyorBlock(getBasicSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 16), AstromineTransportationsItems.getTransportationsBasicSettings()); - public static final Block BASIC_VERTICAL_CONVEYOR = register("basic_vertical_conveyor", new VerticalConveyorBlock(getBasicSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 16), AstromineTransportationsItems.getTransportationsBasicSettings()); - public static final Block BASIC_DOWNWARD_VERTICAL_CONVEYOR = register("basic_downward_vertical_conveyor", new DownwardVerticalConveyorBlock(getBasicSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 16), AstromineTransportationsItems.getTransportationsBasicSettings()); - public static final Block ADVANCED_CONVEYOR = register("advanced_conveyor", new ConveyorBlock(getAdvancedSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 8), AstromineTransportationsItems.getTransportationsBasicSettings()); - public static final Block ADVANCED_VERTICAL_CONVEYOR = register("advanced_vertical_conveyor", new VerticalConveyorBlock(getAdvancedSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 8), AstromineTransportationsItems.getTransportationsBasicSettings()); - public static final Block ADVANCED_DOWNWARD_VERTICAL_CONVEYOR = register("advanced_downward_vertical_conveyor", new DownwardVerticalConveyorBlock(getAdvancedSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 8), AstromineTransportationsItems - .getTransportationsBasicSettings()); - public static final Block ELITE_CONVEYOR = register("elite_conveyor", new ConveyorBlock(getEliteSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 4), AstromineTransportationsItems.getTransportationsBasicSettings()); - public static final Block ELITE_VERTICAL_CONVEYOR = register("elite_vertical_conveyor", new VerticalConveyorBlock(getEliteSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 4), AstromineTransportationsItems.getTransportationsBasicSettings()); - public static final Block ELITE_DOWNWARD_VERTICAL_CONVEYOR = register("elite_downward_vertical_conveyor", new DownwardVerticalConveyorBlock(getEliteSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 4), AstromineTransportationsItems.getTransportationsBasicSettings()); + public static final Block INSERTER = register("inserter", new InserterBlock("normal", 16, getBasicSettings().nonOpaque()), AstromineTransportationsItems.getBasicSettings()); + public static final Block FAST_INSERTER = register("fast_inserter", new InserterBlock("fast", 8, getBasicSettings().nonOpaque()), AstromineTransportationsItems.getBasicSettings()); - public static final Block CATWALK = register("catwalk", new CatwalkBlock(FabricBlockSettings.copyOf(Blocks.STONE).sounds(BlockSoundGroup.METAL).nonOpaque()), AstromineTransportationsItems.getTransportationsBasicSettings()); - public static final Block CATWALK_STAIRS = register("catwalk_stairs", new CatwalkStairsBlock(FabricBlockSettings.copyOf(Blocks.STONE).sounds(BlockSoundGroup.METAL).nonOpaque()), AstromineTransportationsItems.getTransportationsBasicSettings()); + public static final Block BASIC_CONVEYOR = register("basic_conveyor", new ConveyorBlock(getBasicSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 16), AstromineTransportationsItems.getBasicSettings()); + public static final Block BASIC_VERTICAL_CONVEYOR = register("basic_vertical_conveyor", new VerticalConveyorBlock(getBasicSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 16), AstromineTransportationsItems.getBasicSettings()); + public static final Block BASIC_DOWNWARD_VERTICAL_CONVEYOR = register("basic_downward_vertical_conveyor", new DownwardVerticalConveyorBlock(getBasicSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 16), AstromineTransportationsItems.getBasicSettings()); + public static final Block ADVANCED_CONVEYOR = register("advanced_conveyor", new ConveyorBlock(getAdvancedSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 8), AstromineTransportationsItems.getBasicSettings()); + public static final Block ADVANCED_VERTICAL_CONVEYOR = register("advanced_vertical_conveyor", new VerticalConveyorBlock(getAdvancedSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 8), AstromineTransportationsItems.getBasicSettings()); + public static final Block ADVANCED_DOWNWARD_VERTICAL_CONVEYOR = register("advanced_downward_vertical_conveyor", new DownwardVerticalConveyorBlock(getAdvancedSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 8), AstromineTransportationsItems.getBasicSettings()); + public static final Block ELITE_CONVEYOR = register("elite_conveyor", new ConveyorBlock(getEliteSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 4), AstromineTransportationsItems.getBasicSettings()); + public static final Block ELITE_VERTICAL_CONVEYOR = register("elite_vertical_conveyor", new VerticalConveyorBlock(getEliteSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 4), AstromineTransportationsItems.getBasicSettings()); + public static final Block ELITE_DOWNWARD_VERTICAL_CONVEYOR = register("elite_downward_vertical_conveyor", new DownwardVerticalConveyorBlock(getEliteSettings().sounds(BlockSoundGroup.METAL).nonOpaque(), 4), AstromineTransportationsItems.getBasicSettings()); - public static final Block FLUID_CABLE = register("fluid_cable", new FluidCableBlock(FabricBlockSettings.of(Material.METAL).requiresTool().breakByTool(FabricToolTags.PICKAXES, 1).strength(1F, 1.5F).sounds(BlockSoundGroup.METAL)), AstromineTransportationsItems - .getTransportationsBasicSettings()); + public static final Block CATWALK = register("catwalk", new CatwalkBlock(FabricBlockSettings.copyOf(Blocks.STONE).sounds(BlockSoundGroup.METAL).nonOpaque()), AstromineTransportationsItems.getBasicSettings()); + public static final Block CATWALK_STAIRS = register("catwalk_stairs", new CatwalkStairsBlock(FabricBlockSettings.copyOf(Blocks.STONE).sounds(BlockSoundGroup.METAL).nonOpaque()), AstromineTransportationsItems.getBasicSettings()); - public static final Block PRIMITIVE_ENERGY_CABLE = register("primitive_energy_cable", new EnergyCableBlock(64, FabricBlockSettings.of(Material.METAL).requiresTool().breakByTool(FabricToolTags.PICKAXES, 1).strength(1F, 1.5F).sounds(BlockSoundGroup.METAL)), - AstromineTransportationsItems.getTransportationsBasicSettings()); - public static final Block BASIC_ENERGY_CABLE = register("basic_energy_cable", new EnergyCableBlock(256, FabricBlockSettings.of(Material.METAL).requiresTool().breakByTool(FabricToolTags.PICKAXES, 1).strength(1F, 1.5F).sounds(BlockSoundGroup.METAL)), - AstromineTransportationsItems.getTransportationsBasicSettings()); - public static final Block ADVANCED_ENERGY_CABLE = register("advanced_energy_cable", new EnergyCableBlock(1024, FabricBlockSettings.of(Material.METAL).requiresTool().breakByTool(FabricToolTags.PICKAXES, 1).strength(1F, 1.5F).sounds(BlockSoundGroup.METAL)), - AstromineTransportationsItems.getTransportationsBasicSettings()); - public static final Block ELITE_ENERGY_CABLE = register("elite_energy_cable", new EnergyCableBlock(4096, FabricBlockSettings.of(Material.METAL).requiresTool().breakByTool(FabricToolTags.PICKAXES, 1).strength(1F, 1.5F).sounds(BlockSoundGroup.METAL)), - AstromineTransportationsItems.getTransportationsBasicSettings()); + public static final Block FLUID_CABLE = register("fluid_cable", new FluidCableBlock(FabricBlockSettings.of(Material.METAL).requiresTool().breakByTool(FabricToolTags.PICKAXES, 1).strength(1F, 1.5F).sounds(BlockSoundGroup.METAL)), AstromineTransportationsItems.getBasicSettings()); + + public static final Block PRIMITIVE_ENERGY_CABLE = register("primitive_energy_cable", new EnergyCableBlock(64, FabricBlockSettings.of(Material.METAL).requiresTool().breakByTool(FabricToolTags.PICKAXES, 1).strength(1F, 1.5F).sounds(BlockSoundGroup.METAL)), AstromineTransportationsItems.getBasicSettings()); + public static final Block BASIC_ENERGY_CABLE = register("basic_energy_cable", new EnergyCableBlock(256, FabricBlockSettings.of(Material.METAL).requiresTool().breakByTool(FabricToolTags.PICKAXES, 1).strength(1F, 1.5F).sounds(BlockSoundGroup.METAL)), AstromineTransportationsItems.getBasicSettings()); + public static final Block ADVANCED_ENERGY_CABLE = register("advanced_energy_cable", new EnergyCableBlock(1024, FabricBlockSettings.of(Material.METAL).requiresTool().breakByTool(FabricToolTags.PICKAXES, 1).strength(1F, 1.5F).sounds(BlockSoundGroup.METAL)), AstromineTransportationsItems.getBasicSettings()); + public static final Block ELITE_ENERGY_CABLE = register("elite_energy_cable", new EnergyCableBlock(4096, FabricBlockSettings.of(Material.METAL).requiresTool().breakByTool(FabricToolTags.PICKAXES, 1).strength(1F, 1.5F).sounds(BlockSoundGroup.METAL)), AstromineTransportationsItems.getBasicSettings()); public static void initialize() { diff --git a/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/registry/AstromineTransportationsItems.java b/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/registry/AstromineTransportationsItems.java index 38fd7b3d8..0b81a76ab 100644 --- a/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/registry/AstromineTransportationsItems.java +++ b/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/registry/AstromineTransportationsItems.java @@ -30,7 +30,7 @@ import com.github.chainmailstudios.astromine.transportations.registry.client.AstromineTransportationsItemGroups; public class AstromineTransportationsItems extends AstromineItems { - public static Item.Settings getTransportationsBasicSettings() { + public static Item.Settings getBasicSettings() { return new Item.Settings().group(AstromineTransportationsItemGroups.TRANSPORTATIONS); } diff --git a/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/registry/AstromineTransportationsNetworkMembers.java b/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/registry/AstromineTransportationsNetworkMembers.java index 446ea7514..37f18ed0e 100644 --- a/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/registry/AstromineTransportationsNetworkMembers.java +++ b/astromine-transportations/src/main/java/com/github/chainmailstudios/astromine/transportations/registry/AstromineTransportationsNetworkMembers.java @@ -24,14 +24,17 @@ package com.github.chainmailstudios.astromine.transportations.registry; +import com.github.chainmailstudios.astromine.common.network.NetworkMemberType; import com.github.chainmailstudios.astromine.common.network.type.base.NetworkType; import com.github.chainmailstudios.astromine.common.registry.NetworkMemberRegistry; import com.github.chainmailstudios.astromine.registry.AstromineNetworkMembers; import com.github.chainmailstudios.astromine.registry.AstromineNetworkTypes; +import com.github.chainmailstudios.astromine.transportations.common.block.DrainBlock; import com.github.chainmailstudios.astromine.transportations.common.block.EnergyCableBlock; import com.github.chainmailstudios.astromine.transportations.common.block.FluidCableBlock; import static com.github.chainmailstudios.astromine.common.network.NetworkMemberType.NODE; +import static com.github.chainmailstudios.astromine.common.network.NetworkMemberType.REQUESTER; public class AstromineTransportationsNetworkMembers extends AstromineNetworkMembers { public static void initialize() { @@ -44,5 +47,8 @@ public static void initialize() { BLOCK_CONSUMER.put(block -> block instanceof FluidCableBlock, block -> { fluid.register(block, NODE); }); + BLOCK_CONSUMER.put(block -> block instanceof DrainBlock, block -> { + fluid.register(block, REQUESTER); + }); } } diff --git a/astromine-transportations/src/main/resources/assets/astromine/blockstates/drain.json b/astromine-transportations/src/main/resources/assets/astromine/blockstates/drain.json new file mode 100644 index 000000000..d49fb39df --- /dev/null +++ b/astromine-transportations/src/main/resources/assets/astromine/blockstates/drain.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "astromine:block/drain" + } + } +} diff --git a/astromine-transportations/src/main/resources/assets/astromine/blockstates/energy_wire_connector.json b/astromine-transportations/src/main/resources/assets/astromine/blockstates/energy_wire_connector.json deleted file mode 100644 index c55250e0b..000000000 --- a/astromine-transportations/src/main/resources/assets/astromine/blockstates/energy_wire_connector.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "variants": { - "facing=up": { - "model": "astromine:block/energy_wire_connector" - }, - "facing=down": { - "model": "astromine:block/energy_wire_connector", - "x": 180 - }, - "facing=east": { - "model": "astromine:block/energy_wire_connector", - "y": 90, - "x": 90 - }, - "facing=south": { - "model": "astromine:block/energy_wire_connector", - "y": 180, - "x": 90 - }, - "facing=west": { - "model": "astromine:block/energy_wire_connector", - "y": 270, - "x": 90 - }, - "facing=north": { - "model": "astromine:block/energy_wire_connector", - "y": 0, - "x": 90 - } - } -} diff --git a/astromine-transportations/src/main/resources/assets/astromine/models/block/drain.json b/astromine-transportations/src/main/resources/assets/astromine/models/block/drain.json new file mode 100644 index 000000000..cf61a48d0 --- /dev/null +++ b/astromine-transportations/src/main/resources/assets/astromine/models/block/drain.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "particle": "astromine:block/advanced_machine_bottom", + "down": "astromine:block/advanced_machine_bottom", + "up": "astromine:block/advanced_machine_top", + "north": "astromine:block/drain", + "east": "astromine:block/drain", + "south": "astromine:block/drain", + "west": "astromine:block/drain" + } +} diff --git a/astromine-transportations/src/main/resources/assets/astromine/models/item/drain.json b/astromine-transportations/src/main/resources/assets/astromine/models/item/drain.json new file mode 100644 index 000000000..ec9af2689 --- /dev/null +++ b/astromine-transportations/src/main/resources/assets/astromine/models/item/drain.json @@ -0,0 +1,3 @@ +{ + "parent": "astromine:block/drain" +} diff --git a/astromine-transportations/src/main/resources/assets/astromine/textures/block/drain.png b/astromine-transportations/src/main/resources/assets/astromine/textures/block/drain.png new file mode 100644 index 000000000..8e3694a12 Binary files /dev/null and b/astromine-transportations/src/main/resources/assets/astromine/textures/block/drain.png differ diff --git a/astromine-transportations/src/main/resources/data/astromine/loot_tables/blocks/drain.json b/astromine-transportations/src/main/resources/data/astromine/loot_tables/blocks/drain.json new file mode 100644 index 000000000..3ddbd864c --- /dev/null +++ b/astromine-transportations/src/main/resources/data/astromine/loot_tables/blocks/drain.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "astromine:drain" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/astromine-transportations/src/main/resources/data/astromine/recipes/drain.json b/astromine-transportations/src/main/resources/data/astromine/recipes/drain.json new file mode 100644 index 000000000..2c192788f --- /dev/null +++ b/astromine-transportations/src/main/resources/data/astromine/recipes/drain.json @@ -0,0 +1,5 @@ +{ + "type": "minecraft:crafting_shaped", "pattern": ["000", "343", "000"], + "key": {"0": {"tag": "c:bronze_plates"}, "3": {"tag": "c:bronze_gears"}, "4": {"item": "minecraft:bucket"}}, + "result": {"item": "astromine:drain", "count": 1} +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 435b47ae9..31a27a44d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,13 +3,13 @@ org.gradle.jvmargs=-Xmx4G ignoreRemapSrc=false # Fabric minecraft_version=1.16.3 -mappings_version=1.16.3+build.31 +mappings_version=1.16.3+build.40 loader_version=0.10.1+build.209 # Fabric API -api_version=0.23.0+build.410-1.16 +api_version=0.24.0+build.411-1.16 # Mod mod_name=astromine -mod_version=1.11.1 +mod_version=1.11.2 mod_group=com.github.chainmailstudios.astromine version_meta=fabric-1.16.3 # CurseForge @@ -20,7 +20,7 @@ cardinal_components_version=2.6.0 blade_version=2e84810 shapes_version=2.0.0+build.10 patchouli_version=1.16.2-44-FABRIC -lba_version=0.8.2-pre.9 +lba_version=0.8.2 auto_config_version=3.2.2 libstructure_version=1.5 tr_energy_version=0.1.0 @@ -30,7 +30,7 @@ cloth_api_version=1.4.8 kotlin_version=1.4.0 joml_version=1.9.25 maybe_data_version=0446d26 -piglib_version=1.0 +piglib_version=1.0.1 # Conveniences rei_version=5.6.1 modmenu_version=1.14.6+build.31