Fixed memory leak, updated blacklist
This commit is contained in:
parent
7c559cddb9
commit
e68553e2d2
|
|
@ -35,6 +35,14 @@ import java.util.Optional;
|
|||
public class CarriedObjectRender
|
||||
{
|
||||
|
||||
private static Map<RenderType, BufferBuilder> builders = Map.of(
|
||||
RenderType.glint(), new BufferBuilder(RenderType.glint().bufferSize()),
|
||||
RenderType.glintDirect(), new BufferBuilder(RenderType.glintDirect().bufferSize()),
|
||||
RenderType.glintTranslucent(), new BufferBuilder(RenderType.glintTranslucent().bufferSize()),
|
||||
RenderType.entityGlint(), new BufferBuilder(RenderType.entityGlint().bufferSize()),
|
||||
RenderType.entityGlintDirect(), new BufferBuilder(RenderType.entityGlintDirect().bufferSize())
|
||||
);
|
||||
|
||||
public static boolean drawFirstPerson(Player player, MultiBufferSource buffer, PoseStack matrix, int light, float partialTicks)
|
||||
{
|
||||
if(Services.PLATFORM.isModLoaded("firstperson") || Services.PLATFORM.isModLoaded("firstpersonmod"))
|
||||
|
|
@ -159,13 +167,7 @@ public class CarriedObjectRender
|
|||
RenderSystem.enableBlend();
|
||||
RenderSystem.disableCull();
|
||||
RenderSystem.disableDepthTest();
|
||||
Map<RenderType, BufferBuilder> builders = Map.of(
|
||||
RenderType.glint(), new BufferBuilder(RenderType.glint().bufferSize()),
|
||||
RenderType.glintDirect(), new BufferBuilder(RenderType.glintDirect().bufferSize()),
|
||||
RenderType.glintTranslucent(), new BufferBuilder(RenderType.glintTranslucent().bufferSize()),
|
||||
RenderType.entityGlint(), new BufferBuilder(RenderType.entityGlint().bufferSize()),
|
||||
RenderType.entityGlintDirect(), new BufferBuilder(RenderType.entityGlintDirect().bufferSize())
|
||||
);
|
||||
|
||||
BufferSource buffer = MultiBufferSource.immediateWithBuffers(builders, Tesselator.getInstance().getBuilder());
|
||||
|
||||
for (Player player : level.players())
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ public class CarryConfig
|
|||
"mekanismgenerators:wind_generator", "cookingforblockheads:cabinet", "cookingforblockheads:corner", "cookingforblockheads:counter",
|
||||
"cookingforblockheads:oven", "cookingforblockheads:toaster", "cookingforblockheads:milk_jar", "cookingforblockheads:cow_jar",
|
||||
"cookingforblockheads:fruit_basket", "cookingforblockheads:cooking_table", "cookingforblockheads:fridge", "cookingforblockheads:sink",
|
||||
"powah:*"
|
||||
"powah:*", "advancementtrophies:trophy", "mekanismgenerators:heat_generator", "mna:filler_block"
|
||||
};
|
||||
|
||||
@Property(
|
||||
|
|
@ -255,7 +255,7 @@ public class CarryConfig
|
|||
"minecraft:item_frame", "minecraft:painting", "minecraft:shulker_bullet",
|
||||
"animania:hamster", "animania:ferret*", "animania:hedgehog*", "animania:cart",
|
||||
"animania:wagon", "mynko:*", "pixelmon:*", "mocreatures:*", "quark:totem", "vehicle:*",
|
||||
"securitycraft:*", "taterzens:npc", "easy_npc:*"
|
||||
"securitycraft:*", "taterzens:npc", "easy_npc:*", "bodiesbodies:dead_body"
|
||||
};
|
||||
|
||||
@Property(
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import net.minecraft.world.entity.Mob;
|
|||
import net.minecraft.world.entity.MobSpawnType;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.ServerLevelAccessor;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.BlockSnapshot;
|
||||
import net.minecraftforge.event.AddReloadListenerEvent;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user