fix: tool durability not decreasing; smelting recipe for quartz had bad value

This commit is contained in:
minjaesong
2024-02-11 02:09:52 +09:00
parent 87081b0a33
commit 273e56cb35
8 changed files with 12 additions and 15 deletions

View File

@@ -50,8 +50,8 @@ class EntryPoint : ModuleEntryPoint() {
// add smelting recipe for sands
BlockCodex.filter { it.hasTag("SAND") }.forEach { (itemID, _) ->
ItemCodex.get0(itemID)!!.tags.add("SMELTABLE")
ItemCodex.get0(itemID)!!.smeltingProduct = "basegame:148"
ItemCodex[itemID]!!.tags.add("SMELTABLE")
ItemCodex[itemID]!!.smeltingProduct = "basegame:148"
}
println("\n[Basegame.EntryPoint] Welcome back!")

View File

@@ -249,6 +249,10 @@ class FixtureSmelterBasic : FixtureBase, CraftingStation {
if (progress >= CALORIES_PER_ROASTING) {
val smeltingProduct = oreItemProp.smeltingProduct!!
// check if the item even exists
if (ItemCodex[smeltingProduct] == null) throw NullPointerException("No item prop for $smeltingProduct")
if (productItem == null)
productItem = InventoryPair(smeltingProduct, 1L)
else

View File

@@ -155,7 +155,7 @@ class OreLead(originalID: ItemID) : OreItemBase(originalID, true) {
class GemQuartz(originalID: ItemID) : OreItemBase(originalID, true) {
override var originalName = "ITEM_GEM_QUARTZ"
override var smeltingProduct: ItemID? = "item@basegame:149"
override var smeltingProduct: ItemID? = "basegame:149"
override val itemImage: TextureRegion
get() = CommonResourcePool.getAsItemSheet("basegame.items").get(13,6)
}