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