mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Fix anvil inventory sometimes not updating & version up
This commit is contained in:
parent
33c90e1541
commit
57cd58657d
4 changed files with 10 additions and 3 deletions
|
|
@ -53,4 +53,4 @@ Default configuration can be found on following links:
|
|||
- [unit_repair_item.yml](https://github.com/alexcrea/CustomAnvil/blob/master/src/main/resources/unit_repair_item.yml)
|
||||
---
|
||||
### Know issue:
|
||||
- On anvil recipe that do not exist in vanilla, trying to rename an item may make the result item disappear.
|
||||
There is non known issue, if you find one please report the issue.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ plugins {
|
|||
}
|
||||
|
||||
group = "xyz.alexcrea"
|
||||
version = "1.4.0a"
|
||||
version = "1.4.1a"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
|
|
|||
|
|
@ -276,6 +276,8 @@ class AnvilEventListener : Listener {
|
|||
event.view.setProperty(REPAIR_COST, newXp)
|
||||
|
||||
inventory.setItem(ANVIL_OUTPUT_SLOT, resultItem)
|
||||
|
||||
player.updateInventory()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -536,6 +538,11 @@ class AnvilEventListener : Listener {
|
|||
inventory.repairCost = finalAnvilCost
|
||||
|
||||
event.view.setProperty(REPAIR_COST, finalAnvilCost)
|
||||
|
||||
val player = event.view.player
|
||||
if(player is Player){
|
||||
player.updateInventory()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
main: io.delilaheve.CustomAnvil
|
||||
name: CustomAnvil
|
||||
prefix: "Custom Anvil"
|
||||
version: 1.4.0a
|
||||
version: 1.4.1a
|
||||
description: Allow to customise anvil mechanics
|
||||
api-version: 1.18
|
||||
load: POSTWORLD
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue