Skip to content

Commit

Permalink
[#82] Removed TODO with null-textures
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielxs01 committed May 10, 2023
1 parent c7e7917 commit dd5b006
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ private static void checkCache(String blockId, Map<String, ContentPackModel[]> m
final String objId = blockId + identifier + path;

Set<String> objTextures = LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().get(blockId).getObjTextures().get(path);
// TODO is null okay or should it be replaced with ""?
OBJModel model = new OBJModel(new Identifier(LandOfSignals.MODID, path), 0, objTextures);
cache.putIfAbsent(objId, model);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ private static void checkCache(String blockId, Map<String, ContentPackModel[]> m
final String objId = blockId + "/" + path;

Set<String> objTextures = LOSBlocks.BLOCK_DECO.getContentpackDeco().get(blockId).getObjTextures().get(path);
// TODO is null okay or should it be replaced with ""?
OBJModel model = new OBJModel(new Identifier(LandOfSignals.MODID, path), 0, objTextures);
cache.putIfAbsent(objId, model);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ private static void checkCache(String blockId, Map<String, ContentPackModel[]> m
final String objId = blockId + "/" + path;

Set<String> objTextures = LOSBlocks.BLOCK_SIGN_PART.getContentpackSigns().get(blockId).getObjTextures().get(path);
// TODO is null okay or should it be replaced with ""?
OBJModel model = new OBJModel(new Identifier(LandOfSignals.MODID, path), 0, objTextures);
cache.putIfAbsent(objId, model);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ private static void checkCache(String blockId, Map<String, ContentPackModel[]> m
final String objId = blockId + "/" + path;

Set<String> objTextures = LOSBlocks.BLOCK_SIGNAL_BOX.getContentpackSignalboxes().get(blockId).getObjTextures().get(path);
// TODO is null okay or should it be replaced with ""?
OBJModel model = new OBJModel(new Identifier(LandOfSignals.MODID, path), 0, objTextures);
cache.putIfAbsent(objId, model);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ private static void renderStuff(final TileSignalPartAnimated tsp, RenderState st
}
if (!cache.containsKey(id)) {
try {
// TODO is null okay or should it be replaced with ""?
final OBJModel model = new OBJModel(new Identifier(LandOfSignals.MODID, LOSBlocks.BLOCK_SIGNAL_PART_ANIMATED.getPath(id)), 0, LOSBlocks.BLOCK_SIGNAL_PART_ANIMATED.getStates(id));
cache.put(id, model);
} catch (final Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ private static void renderBase(String blockId, ContentPackSignal signal, TileSig
if (!cache.containsKey(objPath)) {
try {
String[] states = LOSBlocks.BLOCK_SIGNAL_PART.getAllStates(blockId);
// TODO is null okay or should it be replaced with ""?
cache.put(objPath, new OBJModel(new Identifier(LandOfSignals.MODID, objPath), 0, Arrays.asList(states)));
cacheInfoOldContentPack.putIfAbsent(blockId, LOSBlocks.BLOCK_SIGNAL_PART.isOldContentPack(blockId));
} catch (Exception e) {
Expand Down Expand Up @@ -103,7 +102,6 @@ private static void renderSignals(String blockId, ContentPackSignal signal, Tile
if (!cache.containsKey(objPath)) {
try {
String[] states = LOSBlocks.BLOCK_SIGNAL_PART.getAllStates(blockId);
// TODO is null okay or should it be replaced with ""?
cache.put(objPath, new OBJModel(new Identifier(LandOfSignals.MODID, objPath), 0, Arrays.asList(states)));
cacheInfoOldContentPack.putIfAbsent(blockId, LOSBlocks.BLOCK_SIGNAL_PART.isOldContentPack(blockId));
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ private static void checkCache(String itemId, Map<String, ContentPackModel[]> mo
final String objId = itemId + identifier + path;

Set<String> objTextures = LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().get(itemId).getObjTextures().get(path);
// TODO is null okay or should it be replaced with ""?
if(objTextures.contains(null)){
objTextures.remove(null);
objTextures.add("");
Expand Down Expand Up @@ -198,7 +197,6 @@ private static void renderSignals(String itemId, Map<String, String> itemGroupSt
if (!cache.containsKey(objId)) {
try {
final Set<String> objTextures = LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().get(itemId).getObjTextures().get(path);
// TODO is null okay or should it be replaced with ""?
if(objTextures.contains(null)){
objTextures.remove(null);
objTextures.add("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ private static void checkCache(String itemId, Map<String, ContentPackModel[]> mo
final String objId = itemId + "/" + path;

Set<String> objTextures = LOSBlocks.BLOCK_DECO.getContentpackDeco().get(itemId).getObjTextures().get(path);
// TODO is null okay or should it be replaced with ""?
objTextures.remove(null);
objTextures.add("");
OBJModel model = new OBJModel(new Identifier(LandOfSignals.MODID, path), 0, objTextures);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ private static void checkCache(String itemId, Map<String, ContentPackModel[]> mo
final String objId = itemId + "/" + path;

Set<String> objTextures = LOSBlocks.BLOCK_SIGN_PART.getContentpackSigns().get(itemId).getObjTextures().get(path);
// TODO is null okay or should it be replaced with ""?
objTextures.remove(null);
objTextures.add("");
OBJModel model = new OBJModel(new Identifier(LandOfSignals.MODID, path), 0, objTextures);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ private static void checkCache(String itemId, Map<String, ContentPackModel[]> mo
final String objId = itemId + "/" + path;

Set<String> objTextures = LOSBlocks.BLOCK_SIGNAL_BOX.getContentpackSignalboxes().get(itemId).getObjTextures().get(path);
// TODO is null okay or should it be replaced with ""?
if(objTextures.contains(null)){
objTextures.remove(null);
objTextures.add("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public static ItemRender.IItemModel getModelFor(final Identifier id, final Vec3d
try {
final OBJModel model;
if (collection != null) {
// TODO is null okay or should it be replaced with ""?
model = new OBJModel(id, 0, collection);
} else {
model = new OBJModel(id, 0);
Expand Down

0 comments on commit dd5b006

Please sign in to comment.