Skip to content

Commit

Permalink
Merge branch 'architectury-1.17.1' into architectury-1.16.5
Browse files Browse the repository at this point in the history
  • Loading branch information
UnlikePaladin committed Dec 28, 2023
2 parents 98cabe8 + afd082e commit 674ba2a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ public static Identifier getTextureId(Block block, String postfix) {
blockToTextureMap.put(pair, new Pair<>(id, attemptNum));
return id;
}
id = ((BakedQuadAccessor)model.getQuads(block.getDefaultState(), Direction.DOWN, new Random(42L)).get(0)).pfm$getSprite().getId();
if (id != null) {
blockToTextureMap.put(pair, new Pair<>(id, attemptNum));
return id;
}
}
}

Expand Down Expand Up @@ -260,6 +265,10 @@ public static Identifier getPlankId(Block block) {
return id;

path = "planks_" + path;
if (namespace.contains("pixelmon") && path.contains("ultra")) {
path = path.replace("ultra_", "").replace("_ultra", "");
path = "ultra_space/" + path;
}
id = new Identifier(namespace, "block/" + path);
path = path.replace("mining", "mine").replace("sorting", "sort").replace("transformation", "trans").replace("dark", "darkwood").replace("alpha_", "alpha_oak_").replace("flowering_pink", "flowerypink").replace("flowering_purple", "floweringpurple");
Identifier id2 = new Identifier(namespace, "block/wood/" + path);
Expand Down Expand Up @@ -300,6 +309,10 @@ public static Identifier getLogId(Block block, String postFix) {
if (namespace.contains("luphieclutteredmod") && path.contains("flowering_log")) {
path = path.replace("flowering_log", "flowering_yellow_log");
}
if (namespace.contains("pixelmon") && path.contains("ultra")) {
path = path.replace("ultra_", "").replace("_ultra", "");
path = "ultra_space/" + path;
}
if (namespace.equals("byg") && path.contains("pedu"))
path = path.replace("pedu", "log");
if (path.contains("log") || path.contains("stem")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public abstract class PFMBlockModelsMixin {
@Shadow public abstract BakedModel getModel(BlockState state);

@Inject(method = "getModelParticleSprite", at = @At("HEAD"), cancellable = true)
@Inject(method = "getSprite", at = @At("HEAD"), cancellable = true)
public void setCustomModelParticle(BlockState state, CallbackInfoReturnable<Sprite> cir) {
BakedModel model = this.getModel(state);
if (model instanceof PFMBakedModelParticleExtension) {
Expand Down

0 comments on commit 674ba2a

Please sign in to comment.