add item frames to NoRender
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m18s

This commit is contained in:
Daniella / Tove 2024-06-13 12:47:18 +02:00
parent 6d852bda01
commit c3331d899a
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

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.feature.category.Render;
import de.com.baseband.client.registry.annotation.Config; import de.com.baseband.client.registry.annotation.Config;
import net.minecraftforge.client.event.RenderBlockOverlayEvent; import net.minecraftforge.client.event.RenderBlockOverlayEvent;
import net.minecraftforge.client.event.RenderItemInFrameEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@Render @Render
@ -29,6 +30,8 @@ public class NoRender extends Feature {
@Config("Toast") @Config("Toast")
public boolean toast; public boolean toast;
@Config("ItemFrame")
public boolean itemFrame;
@SubscribeEvent @SubscribeEvent
@ -37,6 +40,10 @@ public class NoRender extends Feature {
event.setCanceled(true); event.setCanceled(true);
if (block && event.getOverlayType() == RenderBlockOverlayEvent.OverlayType.BLOCK) if (block && event.getOverlayType() == RenderBlockOverlayEvent.OverlayType.BLOCK)
event.setCanceled(true); event.setCanceled(true);
}
@SubscribeEvent
public void renderEntityEvent(RenderItemInFrameEvent event) {
event.setCanceled(itemFrame);
} }
} }