v0.7.1: improved how quickslots handled upgraded items
This commit is contained in:
parent
5207ba4e90
commit
4c120528ec
|
@ -92,7 +92,7 @@ public class QuickSlot {
|
|||
}
|
||||
|
||||
public void convertToPlaceholder(Item item){
|
||||
Item placeholder = Item.virtual(item.getClass());
|
||||
Item placeholder = item.virtual();
|
||||
|
||||
if (placeholder != null && contains(item))
|
||||
for (int i = 0; i < SIZE; i++)
|
||||
|
|
|
@ -425,11 +425,12 @@ public class Item implements Bundlable {
|
|||
return 0;
|
||||
}
|
||||
|
||||
public static Item virtual( Class<? extends Item> cl ) {
|
||||
public Item virtual(){
|
||||
try {
|
||||
|
||||
Item item = (Item)cl.newInstance();
|
||||
Item item = getClass().newInstance();
|
||||
item.quantity = 0;
|
||||
item.level = level;
|
||||
return item;
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user