Merge 1.18 into 1.19.2

This commit is contained in:
embeddedt 2023-07-17 16:08:28 -04:00
commit ab7c982589
No known key found for this signature in database
GPG Key ID: A69433EC199B5613
3 changed files with 5 additions and 3 deletions

View File

@ -14,7 +14,7 @@ public class CachedResourcePath {
public static final Interner<String> PATH_COMPONENT_INTERNER = Interners.newStrongInterner();
private static final Splitter SLASH_SPLITTER = Splitter.on('/');
private static final String[] NO_PREFIX = new String[0];
public static final String[] NO_PREFIX = new String[0];
public CachedResourcePath(String[] prefix, Path path) {
this(prefix, path, path.getNameCount(), true);

View File

@ -447,7 +447,7 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
@Redirect(method = "loadModel", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/StateDefinition;getPossibleStates()Lcom/google/common/collect/ImmutableList;"))
private ImmutableList<BlockState> loadOnlyRelevantBlockState(StateDefinition<Block, BlockState> stateDefinition, ResourceLocation location) {
if(this.inTextureGatheringPass)
if(this.inTextureGatheringPass || !(location instanceof ModelResourceLocation))
return stateDefinition.getPossibleStates();
else
return ModelBakeryHelpers.getBlockStatesForMRL(stateDefinition, (ModelResourceLocation)location);

View File

@ -312,7 +312,9 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
}
@Redirect(method = "loadModel", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/StateDefinition;getPossibleStates()Lcom/google/common/collect/ImmutableList;"))
private ImmutableList<BlockState> loadOnlyRelevantBlockState(StateDefinition<Block, BlockState> stateDefinition, ResourceLocation location) {
return ModelBakeryHelpers.getBlockStatesForMRL(stateDefinition, (ModelResourceLocation)location);
if(!(location instanceof ModelResourceLocation))
return stateDefinition.getPossibleStates();
return ModelBakeryHelpers.getBlockStatesForMRL(stateDefinition, (ModelResourceLocation)location);
}
@Override