Cleanup
This commit is contained in:
@@ -251,6 +251,9 @@ public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait{
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Set configuration. */
|
||||
public void setConfig(Object config){}
|
||||
|
||||
@Override
|
||||
public void removed(){
|
||||
if(sound != null){
|
||||
|
||||
@@ -40,18 +40,13 @@ public class Sorter extends Block{
|
||||
@Override
|
||||
public void playerPlaced(Tile tile){
|
||||
if(lastItem != null){
|
||||
tile.configure(lastItem.id);
|
||||
tile.configure(lastItem);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configured(Tile tile, Player player, int value){
|
||||
tile.<SorterEntity>ent().sortItem = content.item(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawRequestConfig(BuildRequest req, Eachable<BuildRequest> list){
|
||||
drawRequestConfigCenter(req, content.item(req.config), "center");
|
||||
drawRequestConfigCenter(req, (Item)req.config, "center");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -143,10 +138,15 @@ public class Sorter extends Block{
|
||||
@Nullable Item sortItem;
|
||||
|
||||
@Override
|
||||
public Object config(){
|
||||
public Item config(){
|
||||
return sortItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setConfig(Object config){
|
||||
sortItem = (Item)config;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte version(){
|
||||
return 2;
|
||||
|
||||
Reference in New Issue
Block a user