Merge 1.19.2 into 1.19.4
This commit is contained in:
commit
95c3044a40
|
|
@ -14,7 +14,7 @@ public class CachedResourcePath {
|
||||||
|
|
||||||
public static final Interner<String> PATH_COMPONENT_INTERNER = Interners.newStrongInterner();
|
public static final Interner<String> PATH_COMPONENT_INTERNER = Interners.newStrongInterner();
|
||||||
private static final Splitter SLASH_SPLITTER = Splitter.on('/');
|
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) {
|
public CachedResourcePath(String[] prefix, Path path) {
|
||||||
this(prefix, path, path.getNameCount(), true);
|
this(prefix, path, path.getNameCount(), true);
|
||||||
|
|
|
||||||
|
|
@ -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;"))
|
@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) {
|
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
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -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;"))
|
@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) {
|
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
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user