Merge 1.16 into 1.18
This commit is contained in:
commit
92643a244e
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -449,7 +449,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;"))
|
@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) {
|
||||||
if(this.inTextureGatheringPass)
|
if(this.inTextureGatheringPass || !(location instanceof ModelResourceLocation))
|
||||||
return stateDefinition.getPossibleStates();
|
return stateDefinition.getPossibleStates();
|
||||||
else
|
else
|
||||||
return ModelBakeryHelpers.getBlockStatesForMRL(stateDefinition, (ModelResourceLocation)location);
|
return ModelBakeryHelpers.getBlockStatesForMRL(stateDefinition, (ModelResourceLocation)location);
|
||||||
|
|
|
||||||
|
|
@ -304,7 +304,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