Skip to content

Commit

Permalink
[#133] FlareUtils: Using objPathIndex instead of first entry (0)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielxs01 committed Sep 28, 2024
1 parent c2107b7 commit e669c2f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ private static void cacheFlare(Flare flare, List<Flare> cachedFlares, ContentPac
final String flareId = flare.getId();
final OBJModel model = TileSignPartRender.cache().get(objPath);

float[] modelTranslation = sign.getBase().get(flare.getObjPath())[0].getBlock().getTranslation();
float[] modelScaling = sign.getBase().get(flare.getObjPath())[0].getBlock().getScaling();
float[] modelTranslation = sign.getBase().get(flare.getObjPath())[flare.getObjPathIndex()].getBlock().getTranslation();
float[] modelScaling = sign.getBase().get(flare.getObjPath())[flare.getObjPathIndex()].getBlock().getScaling();

String errMsg = String.format("Uh oh. Did not find obj_path %s in model %s for flare %s", flare.getObjPath(), sign.getUniqueId(), flareId);
if(model == null)
Expand Down Expand Up @@ -272,8 +272,8 @@ private static void cacheFlare(Flare flare, List<Flare> cachedFlares, ContentPac
final String flareId = flare.getId();
final OBJModel model = TileDecoRender.cache().get(objPath);

float[] modelTranslation = deco.getBase().get(flare.getObjPath())[0].getBlock().getTranslation();
float[] modelScaling = deco.getBase().get(flare.getObjPath())[0].getBlock().getScaling();
float[] modelTranslation = deco.getBase().get(flare.getObjPath())[flare.getObjPathIndex()].getBlock().getTranslation();
float[] modelScaling = deco.getBase().get(flare.getObjPath())[flare.getObjPathIndex()].getBlock().getScaling();

String errMsg = String.format("Uh oh. Did not find obj_path %s in model %s for flare %s", flare.getObjPath(), deco.getUniqueId(), flareId);
if(model == null)
Expand All @@ -297,8 +297,8 @@ private static void cacheFlare(Flare flare, Map<String, List<Flare>> stateFlares

Map<String, ContentPackModel[]> models =
state.equalsIgnoreCase(ACTIVE) ? lever.getActive() : lever.getInactive();
float[] modelTranslation = models.get(flare.getObjPath())[0].getBlock().getTranslation();
float[] modelScaling = models.get(flare.getObjPath())[0].getBlock().getScaling();
float[] modelTranslation = models.get(flare.getObjPath())[flare.getObjPathIndex()].getBlock().getTranslation();
float[] modelScaling = models.get(flare.getObjPath())[flare.getObjPathIndex()].getBlock().getScaling();

//

Expand Down

0 comments on commit e669c2f

Please sign in to comment.