Merge 1.19.2 into 1.19.4
This commit is contained in:
commit
a1d56e2921
|
|
@ -0,0 +1,30 @@
|
|||
package org.embeddedt.modernfix.common.mixin.safety;
|
||||
|
||||
import net.minecraft.client.renderer.item.ItemProperties;
|
||||
import net.minecraft.client.renderer.item.ItemPropertyFunction;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.Item;
|
||||
import org.embeddedt.modernfix.annotation.ClientOnlyMixin;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Mutable;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@Mixin(value = ItemProperties.class, priority = 700)
|
||||
@ClientOnlyMixin
|
||||
public class ItemPropertiesMixin {
|
||||
@Shadow @Final @Mutable private static Map<ResourceLocation, ItemPropertyFunction> GENERIC_PROPERTIES;
|
||||
@Shadow @Final @Mutable private static Map<Item, Map<ResourceLocation, ItemPropertyFunction>> PROPERTIES;
|
||||
|
||||
@Inject(method = "<clinit>", at = @At("RETURN"))
|
||||
private static void useConcurrentMaps(CallbackInfo ci) {
|
||||
GENERIC_PROPERTIES = new ConcurrentHashMap<>(GENERIC_PROPERTIES);
|
||||
PROPERTIES = new ConcurrentHashMap<>(PROPERTIES);
|
||||
}
|
||||
}
|
||||
|
|
@ -253,6 +253,8 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
|
|||
// As in pathological cases (e.g. Pedestals on 1.19) unbakedCache can lose
|
||||
// the model immediately
|
||||
UnbakedModel result = smallLoadingCache.getOrDefault(modelLocation, iunbakedmodel);
|
||||
// required as some mods (e.g. EBE) call bake directly on the returned model, without resolving parents themselves
|
||||
result.getMaterials(this::getModel, new HashSet<>());
|
||||
// We are done with loading, so clear this cache to allow GC of any unneeded models
|
||||
if(mfix$nestedLoads == 0)
|
||||
smallLoadingCache.clear();
|
||||
|
|
|
|||
|
|
@ -234,6 +234,8 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
|
|||
// As in pathological cases (e.g. Pedestals on 1.19) unbakedCache can lose
|
||||
// the model immediately
|
||||
UnbakedModel result = smallLoadingCache.getOrDefault(modelLocation, iunbakedmodel);
|
||||
// required as some mods (e.g. EBE) call bake directly on the returned model, without resolving parents themselves
|
||||
result.getMaterials(this::getModel, new HashSet<>());
|
||||
// We are done with loading, so clear this cache to allow GC of any unneeded models
|
||||
if(mfix$nestedLoads == 0)
|
||||
smallLoadingCache.clear();
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ do_release() {
|
|||
git tag -a $tag_name -m "$tag_name"
|
||||
git push --tags
|
||||
gh release create $tag_name --target $1 --title "$tag_name" --notes ""
|
||||
# now delete local tag to prevent messing up the detected tag for the next version
|
||||
git tag -d $tag_name &>/dev/null
|
||||
}
|
||||
|
||||
for version in "${all_versions[@]}"; do
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user