Skip to content

Commit

Permalink
Boiler Burnables, Chain Recipe and Crate Tags (#1998)
Browse files Browse the repository at this point in the history
  • Loading branch information
YoungOnionMC authored Sep 22, 2024
1 parent 04e90ef commit 1ac9b94
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,13 @@ public void onMachinePlaced(@Nullable LivingEntity player, ItemStack stack) {
tag.remove("taped");
this.isTaped = false;
}
stack.setTag(null);
}

@Override
public void saveToItem(CompoundTag tag) {
IDropSaveMachine.super.saveToItem(tag);
if (isTaped) {
IDropSaveMachine.super.saveToItem(tag);
tag.putBoolean("taped", isTaped);
tag.put("inventory", inventory.storage.serializeNBT());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ private static void hardIronRecipes(Consumer<ResourceLocation> registry) {
registry.accept(new ResourceLocation("minecraft:hopper"));
registry.accept(new ResourceLocation("minecraft:iron_bars"));
registry.accept(new ResourceLocation("minecraft:bucket"));
registry.accept(new ResourceLocation("minecraft:chain"));
}

private static void hardRedstoneRecipes(Consumer<ResourceLocation> registry) {
Expand Down Expand Up @@ -265,6 +264,7 @@ private static void hardMiscRecipes(Consumer<ResourceLocation> registry) {
registry.accept(new ResourceLocation("minecraft:brush"));
registry.accept(new ResourceLocation("minecraft:recovery_compass"));
registry.accept(new ResourceLocation("minecraft:spyglass"));
registry.accept(new ResourceLocation("minecraft:chain"));
}

private static void hardGlassRecipes(Consumer<ResourceLocation> registry) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.gregtechceu.gtceu.data.recipe.misc;

import com.gregtechceu.gtceu.GTCEu;
import com.gregtechceu.gtceu.api.fluids.store.FluidStorageKeys;
import com.gregtechceu.gtceu.utils.GTUtil;

Expand Down Expand Up @@ -27,15 +28,17 @@ public static void init(Consumer<FinishedRecipe> provider) {
Set<Item> addedItems = new HashSet<>();
for (var fuelEntry : FurnaceBlockEntity.getFuel().entrySet()) {
addedItems.add(fuelEntry.getKey());
STEAM_BOILER_RECIPES.recipeBuilder(BuiltInRegistries.ITEM.getKey(fuelEntry.getKey()))
var resLoc = BuiltInRegistries.ITEM.getKey(fuelEntry.getKey());
STEAM_BOILER_RECIPES.recipeBuilder(GTCEu.id(resLoc.getNamespace() + "_" + resLoc.getPath()))
.inputItems(fuelEntry.getKey())
.duration(fuelEntry.getValue() * 12) // remove the * 12 if SteamBoilerMachine:240 is uncommented
.save(provider);
}
for (Item item : BuiltInRegistries.ITEM) {
var burnTime = GTUtil.getItemBurnTime(item);
if (burnTime > 0 && !addedItems.contains(item)) {
STEAM_BOILER_RECIPES.recipeBuilder(BuiltInRegistries.ITEM.getKey(item))
var resLoc = BuiltInRegistries.ITEM.getKey(item);
STEAM_BOILER_RECIPES.recipeBuilder(GTCEu.id(resLoc.getNamespace() + "_" + resLoc.getPath()))
.inputItems(item)
.duration(burnTime * 12)
.save(provider);
Expand Down

0 comments on commit 1ac9b94

Please sign in to comment.