Skip to content

Commit

Permalink
feat: Add setBurnTime hook
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Jul 3, 2024
1 parent 50b99d7 commit 9d2ccdf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion common/src/main/java/net/blay09/mods/balm/api/BalmHooks.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import net.minecraft.world.entity.Pose;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.DyeColor;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
Expand Down Expand Up @@ -56,7 +57,7 @@ default CompoundTag getPersistentData(Player player) {

int getBurnTime(ItemStack itemStack);

void setBurnTime(ItemStack itemStack, int burnTime);
void setBurnTime(Item item, int burnTime);

void firePlayerCraftingEvent(Player player, ItemStack crafted, Container craftMatrix);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public int getBurnTime(ItemStack itemStack) {
}

@Override
public void setBurnTime(ItemStack itemStack, int burnTime) {
FuelRegistry.INSTANCE.add(itemStack.getItem(), burnTime);
public void setBurnTime(Item item, int burnTime) {
FuelRegistry.INSTANCE.add(item, burnTime);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ public int getBurnTime(ItemStack itemStack) {
}

@Override
public void setBurnTime(ItemStack itemStack, int burnTime) {
burnTimes.put(itemStack.getItem(), burnTime);
public void setBurnTime(Item item, int burnTime) {
burnTimes.put(item, burnTime);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ public int getBurnTime(ItemStack itemStack) {
}

@Override
public void setBurnTime(ItemStack itemStack, int burnTime) {
burnTimes.put(itemStack.getItem(), burnTime);
public void setBurnTime(Item item, int burnTime) {
burnTimes.put(item, burnTime);
}

@Override
Expand Down

0 comments on commit 9d2ccdf

Please sign in to comment.