Skip to content

Commit

Permalink
Do not allow GT MTEs to be removed from the GT machines tab.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorbatron committed Jan 6, 2025
1 parent 15559af commit afccc53
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1690,10 +1690,15 @@ public void addAdditionalCreativeTabs(CreativeTabs creativeTab) {
public void removeFromCreativeTab(CreativeTabs creativeTab) {
Preconditions.checkNotNull(creativeTab, "creativeTab");
if (creativeTab == CreativeTabs.SEARCH) {
GTLog.logger.error("Cannot remove MTEs from the creative search tab!",
GTLog.logger.error("Cannot remove MTEs from the creative search tab.",
new IllegalArgumentException());
return;
}
if (creativeTab == GTCreativeTabs.TAB_GREGTECH_MACHINES &&
metaTileEntityId.getNamespace().equals(GTValues.MODID)) {
GTLog.logger.error("Cannot remove GT MTEs from the GT machines tab.", new IllegalArgumentException());
return;
}
if (!creativeTabs.contains(creativeTab)) {
GTLog.logger.error("{} is not in the creative tab {}.", this, creativeTab.tabLabel,
new IllegalArgumentException());
Expand Down

0 comments on commit afccc53

Please sign in to comment.