Merge 1.20.2 into 1.20.3
This commit is contained in:
commit
9861926f1d
|
|
@ -2,6 +2,7 @@ package org.embeddedt.modernfix.common.mixin.bugfix.buffer_builder_leak;
|
|||
|
||||
import com.mojang.blaze3d.vertex.BufferBuilder;
|
||||
import org.embeddedt.modernfix.ModernFix;
|
||||
import org.embeddedt.modernfix.annotation.ClientOnlyMixin;
|
||||
import org.embeddedt.modernfix.render.UnsafeBufferHelper;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
|
@ -12,6 +13,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
import java.nio.ByteBuffer;
|
||||
|
||||
@Mixin(BufferBuilder.class)
|
||||
@ClientOnlyMixin
|
||||
public class BufferBuilderMixin {
|
||||
@Shadow private ByteBuffer buffer;
|
||||
@Shadow private boolean closed;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,13 @@ public class CachedResourcePath {
|
|||
* DOES NOT INTERN!
|
||||
*/
|
||||
public CachedResourcePath(String[] pathComponents) {
|
||||
for(String s : pathComponents) {
|
||||
if(s.length() == 0) {
|
||||
// reconstruct the whole array skipping blanks. inefficient, but should not be the common case
|
||||
pathComponents = Arrays.stream(pathComponents).filter(comp -> comp.length() > 0).toArray(String[]::new);
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.pathComponents = pathComponents;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
package org.embeddedt.modernfix.forge.mixin.perf.forge_registry_lambda;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraftforge.fml.RegistryObject;
|
||||
import net.minecraftforge.registries.IForgeRegistryEntry;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
|
@ -10,7 +9,7 @@ import org.spongepowered.asm.mixin.Overwrite;
|
|||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
@Mixin(value = RegistryObject.class, remap = false)
|
||||
public class RegistryObjectMixin<T extends IForgeRegistryEntry<? super T>> {
|
||||
public class RegistryObjectMixin<T> {
|
||||
@Shadow private @Nullable T value;
|
||||
|
||||
@Shadow @Final private ResourceLocation name;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user