nopotion norender
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m0s

This commit is contained in:
Jess H 2024-06-17 10:34:21 +01:00
parent efb4023b16
commit 16a167e83d
Signed by: UnixSystemV
GPG key ID: 9B21C50B68D67F19

View file

@ -4,6 +4,7 @@ import de.com.baseband.client.feature.Feature;
import de.com.baseband.client.feature.category.Render;
import de.com.baseband.client.registry.annotation.Config;
import net.minecraftforge.client.event.RenderBlockOverlayEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderItemInFrameEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@ -33,6 +34,9 @@ public class NoRender extends Feature {
@Config("ItemFrame")
public boolean itemFrame;
@Config("NoPotionIcon")
public boolean noPotion;
@SubscribeEvent
public void overlayBlockRenderEvent(RenderBlockOverlayEvent event) {
@ -42,6 +46,12 @@ public class NoRender extends Feature {
event.setCanceled(true);
}
@SubscribeEvent
public void overlayGameRenderEvent(RenderGameOverlayEvent event) {
if (noPotion && event.getType() == RenderGameOverlayEvent.ElementType.POTION_ICONS)
event.setCanceled(true);
}
@SubscribeEvent
public void renderEntityEvent(RenderItemInFrameEvent event) {
event.setCanceled(itemFrame);