@Test public void getTileRegistry() { Map<Tiles, TileInfo> registry = TileInfo.getTileRegistry(); assert (registry.size() > 0); assert (registry.containsValue(testGasTile)); assert (registry.containsValue(testSolidTile)); assert (registry.containsValue(testLiquidTile)); TileInfo newTile = new TileSolid(Tiles.AIR); Exception ex = null; try { registry.put(Tiles.AIR, newTile); } catch (UnsupportedOperationException e) { ex = e; } assert (ex != null); }
public static Map<Tiles, TileInfo> getTileRegistry() { return Collections.unmodifiableMap(tileRegistry); }
TileInfo { public static Map<Tiles, TileInfo> getTileRegistry() { return Collections.unmodifiableMap(tileRegistry); } }
TileInfo { public static Map<Tiles, TileInfo> getTileRegistry() { return Collections.unmodifiableMap(tileRegistry); } TileInfo(Tiles type); }
TileInfo { public static Map<Tiles, TileInfo> getTileRegistry() { return Collections.unmodifiableMap(tileRegistry); } TileInfo(Tiles type); static Map<Tiles, TileInfo> getTileRegistry(); static boolean hasLoaded(); static void registerTiles(); static void clearRegistry(); static TileInfo get(Tiles type); Map<String, String> getSpriteFilenames(); TileInfo setDefaultFilename(String filename); int getBlockWidth(); int getBlockHeight(); int getNumSpriteFrames(); int getSpriteFrameDuration(); Tiles getType(); String getDisplayName(); TileInfo setDisplayName(String displayName); boolean isNaturalSurface(); boolean isDestructible(); TileInfo getBackgroundTile(); TileInfo getDamagedTile(); TileInfo setBackgroundTile(Tiles backgroundTile); TileInfo setDamagedTile(Tiles damagedTile); TileInfo setNaturalSurface(boolean naturalSurface); TileInfo setDestructible(boolean destructible); abstract boolean isObstacle(); abstract boolean isLiquid(); void onEntityOnTopOfBlock(Entity entity, Tile tile, long ms); List<String> getVariants(); @Override boolean equals(Object o); @Override int hashCode(); }
TileInfo { public static Map<Tiles, TileInfo> getTileRegistry() { return Collections.unmodifiableMap(tileRegistry); } TileInfo(Tiles type); static Map<Tiles, TileInfo> getTileRegistry(); static boolean hasLoaded(); static void registerTiles(); static void clearRegistry(); static TileInfo get(Tiles type); Map<String, String> getSpriteFilenames(); TileInfo setDefaultFilename(String filename); int getBlockWidth(); int getBlockHeight(); int getNumSpriteFrames(); int getSpriteFrameDuration(); Tiles getType(); String getDisplayName(); TileInfo setDisplayName(String displayName); boolean isNaturalSurface(); boolean isDestructible(); TileInfo getBackgroundTile(); TileInfo getDamagedTile(); TileInfo setBackgroundTile(Tiles backgroundTile); TileInfo setDamagedTile(Tiles damagedTile); TileInfo setNaturalSurface(boolean naturalSurface); TileInfo setDestructible(boolean destructible); abstract boolean isObstacle(); abstract boolean isLiquid(); void onEntityOnTopOfBlock(Entity entity, Tile tile, long ms); List<String> getVariants(); @Override boolean equals(Object o); @Override int hashCode(); static final int BLOCK_WIDTH; static final int BLOCK_HEIGHT; }