Fixed: map mirror / crashes / mech pads / player list / mobile placement
This commit is contained in:
@@ -49,7 +49,7 @@ public class ItemTransfer extends TimedEntity implements DrawTrait{
|
||||
|
||||
@Remote(called = Loc.server)
|
||||
public static void transferItemTo(Item item, int amount, float x, float y, Tile tile){
|
||||
if(tile == null) return;
|
||||
if(tile == null || tile.entity == null || tile.entity.items == null) return;
|
||||
for(int i = 0; i < Mathf.clamp(amount / 3, 1, 8); i++){
|
||||
Timers.run(i * 3, () -> create(item, x, y, tile, () -> {
|
||||
}));
|
||||
|
||||
@@ -14,7 +14,7 @@ public interface TypeTrait{
|
||||
*/
|
||||
static <T extends TypeTrait> void registerType(Class<T> type, Supplier<T> supplier){
|
||||
if(typeToID.get(type, -1) != -1){
|
||||
throw new RuntimeException("Type is already registered: '" + type + "'!");
|
||||
return; //already registered
|
||||
}
|
||||
|
||||
registeredTypes.add(supplier);
|
||||
|
||||
Reference in New Issue
Block a user