Fixed: map mirror / crashes / mech pads / player list / mobile placement

This commit is contained in:
Anuken
2018-10-17 10:20:58 -04:00
parent a29f95194d
commit 8e952a550b
17 changed files with 40 additions and 26 deletions
@@ -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);