Backport of patch #6543 to enable Stencil buffer in net.minecraft.client.shader.Framebuffer. Closes #6751

This commit is contained in:
50ap5ud5 authored and David Quintana committed 2020-07-01 17:47:42 +02:00
1 parent a401a9b9d0
commit 23f00d26bb
3 files changed
+92

No files matched your search

@@ -0,0 +1,43 @@
/*
* Minecraft Forge
* Copyright (c) 2016-2019.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraftforge.testmods;
import net.minecraft.client.Minecraft;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.DeferredWorkQueue;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
@SuppressWarnings("deprecation")
@Mod(StencilTest.MODID)
public class StencilTest {
public static final String MODID = "stencil_backport_test";
public StencilTest() {
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
modEventBus.addListener(this::clientSetup);
}
private void clientSetup(FMLClientSetupEvent event) {
DeferredWorkQueue.runLater(() -> Minecraft.getInstance().getFramebuffer().enableStencil());
}
}
+2
View File
@@ -69,3 +69,5 @@ loaderVersion="[28,)"
modId="custom_plant_type_test"
[[mods]]
modId="forgedebugmultilayermodel"
[[mods]]
modId="stencil_backport_test"