Skip to content

Commit

Permalink
Prevent Grid from rendering when holding a cover when block takes no …
Browse files Browse the repository at this point in the history
…covers
  • Loading branch information
ALongStringOfNumbers committed Feb 2, 2025
1 parent b9e8b49 commit cbd91c4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ public boolean canPlaceCoverOnSide(@NotNull EnumFacing side) {
}

@Override
public final boolean acceptsCovers() {
public boolean acceptsCovers() {
return covers.size() < EnumFacing.VALUES.length;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,11 @@ public boolean canPlaceCoverOnSide(@NotNull EnumFacing side) {
return false;
}

@Override
public boolean acceptsCovers() {
return false;
}

@Override
public boolean canRenderMachineGrid(@NotNull ItemStack mainHandStack, @NotNull ItemStack offHandStack) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@
import gregtech.api.gui.ModularUI.Builder;
import gregtech.api.gui.Widget.ClickData;
import gregtech.api.gui.resources.TextureArea;
import gregtech.api.gui.widgets.*;
import gregtech.api.gui.widgets.AbstractWidgetGroup;
import gregtech.api.gui.widgets.ClickButtonWidget;
import gregtech.api.gui.widgets.CraftingStationInputWidgetGroup;
import gregtech.api.gui.widgets.ImageWidget;
import gregtech.api.gui.widgets.LabelWidget;
import gregtech.api.gui.widgets.SimpleTextWidget;
import gregtech.api.gui.widgets.SlotWidget;
import gregtech.api.gui.widgets.TabGroup;
import gregtech.api.gui.widgets.TabGroup.TabLocation;
import gregtech.api.gui.widgets.WidgetGroup;
import gregtech.api.gui.widgets.tab.ItemTabInfo;
import gregtech.api.items.itemhandlers.GTItemStackHandler;
import gregtech.api.metatileentity.MetaTileEntity;
Expand Down Expand Up @@ -254,6 +262,11 @@ public boolean canPlaceCoverOnSide(@NotNull EnumFacing side) {
return false;
}

@Override
public boolean acceptsCovers() {
return false;
}

@Override
public boolean canRenderMachineGrid(@NotNull ItemStack mainHandStack, @NotNull ItemStack offHandStack) {
return false;
Expand Down

0 comments on commit cbd91c4

Please sign in to comment.