diff --git a/Fabric/src/main/java/vazkii/botania/fabric/client/FabricClientInitializer.java b/Fabric/src/main/java/vazkii/botania/fabric/client/FabricClientInitializer.java index 011bef313a..5a08d22601 100644 --- a/Fabric/src/main/java/vazkii/botania/fabric/client/FabricClientInitializer.java +++ b/Fabric/src/main/java/vazkii/botania/fabric/client/FabricClientInitializer.java @@ -1,7 +1,5 @@ package vazkii.botania.fabric.client; -import com.mojang.blaze3d.vertex.BufferBuilder; - import net.fabricmc.api.ClientModInitializer; import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents; @@ -17,7 +15,6 @@ import net.minecraft.client.gui.screens.MenuScreens; import net.minecraft.client.particle.ParticleProvider; import net.minecraft.client.particle.SpriteSet; -import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.blockentity.BlockEntityRenderers; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.LivingEntityRenderer; @@ -38,7 +35,6 @@ import vazkii.botania.client.core.handler.KonamiHandler; import vazkii.botania.client.core.handler.MiscellaneousModels; import vazkii.botania.client.core.helper.CoreShaders; -import vazkii.botania.client.core.helper.RenderHelper; import vazkii.botania.client.core.proxy.ClientProxy; import vazkii.botania.client.fx.BotaniaParticles; import vazkii.botania.client.gui.HUDHandler; @@ -59,13 +55,11 @@ import vazkii.botania.common.item.equipment.armor.manasteel.ManasteelArmorItem; import vazkii.botania.common.lib.LibMisc; import vazkii.botania.fabric.network.FabricPacketHandler; -import vazkii.botania.mixin.client.RenderBuffersAccessor; import vazkii.botania.xplat.XplatAbstractions; import vazkii.patchouli.api.BookDrawScreenCallback; import java.io.IOException; import java.io.UncheckedIOException; -import java.util.SortedMap; import java.util.function.Function; public class FabricClientInitializer implements ClientModInitializer { @@ -161,10 +155,6 @@ private static void registerArmors() { private void loadComplete(Minecraft mc) { ColorHandler.submitBlocks(ColorProviderRegistry.BLOCK::register); ColorHandler.submitItems(ColorProviderRegistry.ITEM::register); - - // Needed to prevent mana pools on carts from X-raying through the cart - SortedMap layers = ((RenderBuffersAccessor) mc.renderBuffers()).getEntityBuilders(); - layers.put(RenderHelper.MANA_POOL_WATER, new BufferBuilder(RenderHelper.MANA_POOL_WATER.bufferSize())); } private void initAuxiliaryRender(EntityType type, LivingEntityRenderer renderer, diff --git a/Forge/src/main/java/vazkii/botania/forge/client/ForgeClientInitializer.java b/Forge/src/main/java/vazkii/botania/forge/client/ForgeClientInitializer.java index ba28ca37d7..812f9b4c9f 100644 --- a/Forge/src/main/java/vazkii/botania/forge/client/ForgeClientInitializer.java +++ b/Forge/src/main/java/vazkii/botania/forge/client/ForgeClientInitializer.java @@ -1,7 +1,6 @@ package vazkii.botania.forge.client; import com.google.common.base.Suppliers; -import com.mojang.blaze3d.vertex.BufferBuilder; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screens.MenuScreens; @@ -9,7 +8,6 @@ import net.minecraft.client.particle.ParticleProvider; import net.minecraft.client.particle.SpriteSet; import net.minecraft.client.renderer.ItemBlockRenderTypes; -import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.ShaderInstance; import net.minecraft.client.renderer.entity.player.PlayerRenderer; import net.minecraft.client.renderer.item.ItemProperties; @@ -30,7 +28,6 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; -import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent; import vazkii.botania.api.BotaniaAPI; import vazkii.botania.api.BotaniaForgeClientCapabilities; @@ -39,7 +36,6 @@ import vazkii.botania.client.BotaniaItemProperties; import vazkii.botania.client.core.handler.*; import vazkii.botania.client.core.helper.CoreShaders; -import vazkii.botania.client.core.helper.RenderHelper; import vazkii.botania.client.core.proxy.ClientProxy; import vazkii.botania.client.fx.BotaniaParticles; import vazkii.botania.client.gui.HUDHandler; @@ -59,7 +55,6 @@ import vazkii.botania.common.item.BotaniaItems; import vazkii.botania.common.item.equipment.bauble.RingOfDexterousMotionItem; import vazkii.botania.forge.CapabilityUtil; -import vazkii.botania.mixin.client.RenderBuffersAccessor; import vazkii.botania.xplat.ClientXplatAbstractions; import vazkii.botania.xplat.XplatAbstractions; import vazkii.patchouli.api.BookDrawScreenEvent; @@ -69,7 +64,6 @@ import java.util.Collections; import java.util.IdentityHashMap; import java.util.Map; -import java.util.SortedMap; import java.util.function.Function; import java.util.function.Supplier; @@ -215,14 +209,6 @@ private static void attachEntityCapabilities(AttachCapabilitiesEvent e) } } - @SubscribeEvent - public static void loadComplete(FMLLoadCompleteEvent evt) { - // Needed to prevent mana pools on carts from X-raying through the cart - SortedMap layers = ((RenderBuffersAccessor) Minecraft.getInstance() - .renderBuffers()).getEntityBuilders(); - layers.put(RenderHelper.MANA_POOL_WATER, new BufferBuilder(RenderHelper.MANA_POOL_WATER.bufferSize())); - } - @SubscribeEvent public static void registerModelLoader(ModelEvent.RegisterGeometryLoaders evt) { evt.register(ClientXplatAbstractions.FLOATING_FLOWER_MODEL_LOADER_ID.getPath(), diff --git a/Xplat/src/main/java/vazkii/botania/mixin/client/RenderBuffersAccessor.java b/Xplat/src/main/java/vazkii/botania/mixin/client/RenderBuffersAccessor.java deleted file mode 100644 index 93eb4cd24e..0000000000 --- a/Xplat/src/main/java/vazkii/botania/mixin/client/RenderBuffersAccessor.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This class is distributed as part of the Botania Mod. - * Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under the - * Botania License: http://botaniamod.net/license.php - */ -package vazkii.botania.mixin.client; - -import com.mojang.blaze3d.vertex.BufferBuilder; - -import net.minecraft.client.renderer.RenderBuffers; -import net.minecraft.client.renderer.RenderType; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Accessor; - -import java.util.SortedMap; - -@Mixin(RenderBuffers.class) -public interface RenderBuffersAccessor { - @Accessor("fixedBuffers") - SortedMap getEntityBuilders(); -} diff --git a/Xplat/src/main/resources/botania_xplat.mixins.json b/Xplat/src/main/resources/botania_xplat.mixins.json index 43595f5221..db8a3f57e2 100644 --- a/Xplat/src/main/resources/botania_xplat.mixins.json +++ b/Xplat/src/main/resources/botania_xplat.mixins.json @@ -73,7 +73,6 @@ "client.RecipeBookComponentAccessor", "client.RecipeBookComponentMixin", "client.RecipeBookPageAccessor", - "client.RenderBuffersAccessor", "client.RenderTypeAccessor", "client.SkullBlockRendererMixin", "client.SoundEngineMixin",