use of io.github.bananapuncher714.crafters.display.CraftDisplay in project PublicCrafters by BananaPuncher714.
the class CustomInventoryCrafting method move.
@Override
public PublicCraftingInventory move(Location location) {
display.stop();
if (manager.get(bloc) == this) {
manager.benches.remove(bloc);
}
bloc = location;
CustomInventoryCrafting whatsHere = manager.put(location, this);
display = new CraftDisplay(this);
display.update();
return whatsHere;
}
use of io.github.bananapuncher714.crafters.display.CraftDisplay in project PublicCrafters by BananaPuncher714.
the class CustomInventoryCrafting method move.
@Override
public PublicCraftingInventory move(Location location) {
display.stop();
if (manager.get(bloc) == this) {
manager.benches.remove(bloc);
}
bloc = location;
CustomInventoryCrafting whatsHere = manager.put(location, this);
display = new CraftDisplay(this);
display.update();
return whatsHere;
}
use of io.github.bananapuncher714.crafters.display.CraftDisplay in project PublicCrafters by BananaPuncher714.
the class CustomInventoryCrafting method move.
@Override
public PublicCraftingInventory move(Location location) {
display.stop();
if (manager.get(bloc) == this) {
manager.benches.remove(bloc);
}
bloc = location;
CustomInventoryCrafting whatsHere = manager.put(location, this);
display = new CraftDisplay(this);
display.update();
return whatsHere;
}
use of io.github.bananapuncher714.crafters.display.CraftDisplay in project PublicCrafters by BananaPuncher714.
the class CustomInventoryCrafting method move.
@Override
public PublicCraftingInventory move(Location location) {
display.stop();
if (manager.get(bloc) == this) {
manager.benches.remove(bloc);
}
bloc = location;
CustomInventoryCrafting whatsHere = manager.put(location, this);
display = new CraftDisplay(this);
display.update();
return whatsHere;
}
use of io.github.bananapuncher714.crafters.display.CraftDisplay in project PublicCrafters by BananaPuncher714.
the class CraftingListener method onCraftDisplayUpdateEvent.
@EventHandler
public void onCraftDisplayUpdateEvent(CraftDisplayUpdateEvent event) {
CraftDisplay craftDisplay = event.getDisplay();
ItemDisplay display = craftDisplay.getItemDisplays().get(4);
if (display == null) {
return;
}
Material result = craftDisplay.getInventory().getResult().getType();
if ((result != Material.DIAMOND_CHESTPLATE && display instanceof CustomItemDisplay) || (!(display instanceof CustomItemDisplay) && display.getItem().getType() == Material.DIAMOND && result == Material.DIAMOND_CHESTPLATE)) {
event.getDisplay().update(1, 1, true);
}
}
Aggregations