Merge 1.19.4 into 1.20

This commit is contained in:
embeddedt 2023-07-17 16:09:27 -04:00
commit e34beb5775
No known key found for this signature in database
GPG Key ID: A69433EC199B5613
3 changed files with 7 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

@ -273,7 +273,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

View File

@ -255,7 +255,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