Skip to content

Commit 7a67138

Browse files
fix: final comments for now
1 parent 50d3a52 commit 7a67138

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

src/main/java/com/tcm/MineTale/block/workbenches/CampfireWorkbench.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ public class CampfireWorkbench extends AbstractWorkbench<CampfireWorkbenchEntity
3131
public static final boolean IS_WIDE = false;
3232
public static final boolean IS_TALL = false;
3333

34-
public static final MapCodec<CampfireWorkbench> CODEC = simpleCodec((properties) ->
35-
new CampfireWorkbench(properties, () -> null));
34+
public static final MapCodec<CampfireWorkbench> CODEC = simpleCodec(CampfireWorkbench::new);
3635

3736
/**
3837
* Creates a CampfireWorkbench configured to use the mod's CAMPFIRE_WORKBENCH_BE block entity type.

src/main/java/com/tcm/MineTale/block/workbenches/entity/FurnaceWorkbenchEntity.java

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import com.tcm.MineTale.registry.ModBlockEntities;
1010

1111
import net.minecraft.core.BlockPos;
12+
import net.minecraft.tags.ItemTags;
1213
import net.minecraft.world.Container;
1314
import net.minecraft.world.SimpleContainer;
1415
import net.minecraft.world.entity.player.Inventory;
@@ -214,7 +215,7 @@ private void smeltItem(ItemStack input) {
214215
ItemStack output = inventory.getItem(outputSlot);
215216

216217
if (output.isEmpty()) {
217-
inventory.setItem(2, result.copy());
218+
inventory.setItem(outputSlot, result.copy())
218219
} else if (ItemStack.isSameItem(output, result)) {
219220
output.grow(result.getCount());
220221
}
@@ -262,19 +263,19 @@ private int findOutputSlot(ItemStack result) {
262263
}
263264

264265
/**
265-
* Determines whether the provided item stack is a supported ore.
266-
*
267-
* @param stack the item stack to test
268-
* @return `true` if the stack is a supported ore (currently `Items.RAW_COPPER`), `false` otherwise
269-
*/
266+
* Determines whether the provided item stack is a supported ore.
267+
*
268+
* @param stack the item stack to test
269+
* @return `true` if the stack is a supported ore (currently `Items.RAW_COPPER`), `false` otherwise
270+
*/
270271
private boolean isOre(ItemStack stack) { return stack.is(Items.RAW_COPPER); /* Add more ores */ }
271272
/**
272-
* Determines whether the given item stack represents a wood log item.
273-
*
274-
* @param stack the item stack to inspect
275-
* @return `true` if the stack's item is a wood log, `false` otherwise
276-
*/
277-
private boolean isWood(ItemStack stack) { return stack.getItem().toString().contains("log"); }
273+
* Determines whether the given item stack represents a wood log item.
274+
*
275+
* @param stack the item stack to inspect
276+
* @return `true` if the stack's item is a wood log, `false` otherwise
277+
*/
278+
private boolean isWood(ItemStack stack) { return stack.is(ItemTags.LOGS_THAT_BURN); }
278279

279280
/**
280281
* Persist entity-specific state into the provided ValueOutput.

0 commit comments

Comments
 (0)