Skip to content

Commit

Permalink
Created a class for easy access to the FurnaceBlock slots, to reflect…
Browse files Browse the repository at this point in the history
… the BrewingStand one.
  • Loading branch information
KameiB committed Dec 15, 2024
1 parent ba14cb1 commit 1fd5270
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.github.fnar.minecraft.block.decorative;

public class FurnaceBlock {

public static class Slot {
public static final int TO_SMELT = 0;
public static final int FUEL = 1;
public static final int RESULT = 2;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package greymerk.roguelike.dungeon.rooms.prototype;

import com.github.fnar.minecraft.block.decorative.FurnaceBlock;
import com.google.common.collect.Lists;

import com.github.fnar.minecraft.block.BlockType;
Expand Down Expand Up @@ -210,7 +211,7 @@ private void generateFurnace(Coord origin, Direction entranceDirection) {

RldItemStack coal = Material.Type.COAL.asItemStack().withCount(2 + random().nextInt(3));

worldEditor.setItem(furnace, WorldEditor.FURNACE_FUEL_SLOT, coal);
worldEditor.setItem(furnace, FurnaceBlock.Slot.FUEL, coal);
}

}

0 comments on commit 1fd5270

Please sign in to comment.