nopotion norender
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m0s
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m0s
This commit is contained in:
parent
efb4023b16
commit
16a167e83d
1 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue