Rename MainItemGroup to MainCreativeTab
This commit is contained in:
@@ -5,7 +5,7 @@ import com.refinedmods.refinedstorage.config.ClientConfig;
|
||||
import com.refinedmods.refinedstorage.config.ServerConfig;
|
||||
import com.refinedmods.refinedstorage.datageneration.DataGenerators;
|
||||
import com.refinedmods.refinedstorage.integration.curios.CuriosIntegration;
|
||||
import com.refinedmods.refinedstorage.item.group.MainItemGroup;
|
||||
import com.refinedmods.refinedstorage.item.group.MainCreativeTab;
|
||||
import com.refinedmods.refinedstorage.network.NetworkHandler;
|
||||
import com.refinedmods.refinedstorage.setup.ClientSetup;
|
||||
import com.refinedmods.refinedstorage.setup.CommonSetup;
|
||||
@@ -28,7 +28,7 @@ public final class RS {
|
||||
public static final String NAME = "Refined Storage";
|
||||
|
||||
public static final NetworkHandler NETWORK_HANDLER = new NetworkHandler();
|
||||
public static final CreativeModeTab MAIN_GROUP = new MainItemGroup();
|
||||
public static final CreativeModeTab CREATIVE_TAB = new MainCreativeTab();
|
||||
public static final ServerConfig SERVER_CONFIG = new ServerConfig();
|
||||
public static final ClientConfig CLIENT_CONFIG = new ClientConfig();
|
||||
|
||||
|
@@ -207,7 +207,7 @@ public final class RSItems {
|
||||
}
|
||||
|
||||
private static <T extends BaseBlock> RegistryObject<BlockItem> registerBlockItemFor(RegistryObject<T> block) {
|
||||
return ITEMS.register(block.getId().getPath(), () -> new BaseBlockItem(block.get(), new Item.Properties().tab(RS.MAIN_GROUP)));
|
||||
return ITEMS.register(block.getId().getPath(), () -> new BaseBlockItem(block.get(), new Item.Properties().tab(RS.CREATIVE_TAB)));
|
||||
}
|
||||
|
||||
public static void register() {
|
||||
|
@@ -5,7 +5,7 @@ import net.minecraft.world.item.Item;
|
||||
|
||||
public class CoreItem extends Item {
|
||||
public CoreItem() {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB));
|
||||
}
|
||||
|
||||
public enum Type {
|
||||
|
@@ -40,7 +40,7 @@ public class CoverItem extends Item {
|
||||
|
||||
|
||||
public CoverItem() {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB));
|
||||
}
|
||||
|
||||
public static void setItem(ItemStack cover, ItemStack item) {
|
||||
|
@@ -41,7 +41,7 @@ public class FilterItem extends Item {
|
||||
private static final String NBT_TYPE = "Type";
|
||||
|
||||
public FilterItem() {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1));
|
||||
}
|
||||
|
||||
public static int getCompare(ItemStack stack) {
|
||||
|
@@ -35,7 +35,7 @@ public class FluidStorageDiskItem extends Item implements IStorageDiskProvider {
|
||||
private final FluidStorageType type;
|
||||
|
||||
public FluidStorageDiskItem(FluidStorageType type) {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1));
|
||||
|
||||
this.type = type;
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@ import net.minecraft.world.item.Item;
|
||||
|
||||
public class FluidStoragePartItem extends Item {
|
||||
public FluidStoragePartItem() {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB));
|
||||
}
|
||||
|
||||
public static FluidStoragePartItem getByType(FluidStorageType type) {
|
||||
|
@@ -28,7 +28,7 @@ public class NetworkCardItem extends Item {
|
||||
private static final String NBT_DIMENSION = "Dimension";
|
||||
|
||||
public NetworkCardItem() {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@@ -54,7 +54,7 @@ public class PatternItem extends Item implements ICraftingPatternProvider, IItem
|
||||
private static final int VERSION = 1;
|
||||
|
||||
public PatternItem() {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB));
|
||||
}
|
||||
|
||||
public static ICraftingPattern fromCache(Level level, ItemStack stack) {
|
||||
|
@@ -5,6 +5,6 @@ import net.minecraft.world.item.Item;
|
||||
|
||||
public class ProcessorBindingItem extends Item {
|
||||
public ProcessorBindingItem() {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB));
|
||||
}
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@ import net.minecraft.world.item.Item;
|
||||
|
||||
public class ProcessorItem extends Item {
|
||||
public ProcessorItem() {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB));
|
||||
}
|
||||
|
||||
public enum Type {
|
||||
|
@@ -5,6 +5,6 @@ import net.minecraft.world.item.Item;
|
||||
|
||||
public class QuartzEnrichedIronItem extends Item {
|
||||
public QuartzEnrichedIronItem() {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB));
|
||||
}
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ public class SecurityCardItem extends Item {
|
||||
private static final String NBT_PERMISSION = "Permission_%d";
|
||||
|
||||
public SecurityCardItem() {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@@ -5,6 +5,6 @@ import net.minecraft.world.item.Item;
|
||||
|
||||
public class SiliconItem extends Item {
|
||||
public SiliconItem() {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB));
|
||||
}
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@ public class StorageDiskItem extends Item implements IStorageDiskProvider {
|
||||
private final ItemStorageType type;
|
||||
|
||||
public StorageDiskItem(ItemStorageType type) {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1));
|
||||
|
||||
this.type = type;
|
||||
}
|
||||
|
@@ -5,6 +5,6 @@ import net.minecraft.world.item.Item;
|
||||
|
||||
public class StorageHousingItem extends Item {
|
||||
public StorageHousingItem() {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB));
|
||||
}
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@ import net.minecraft.world.item.Item;
|
||||
|
||||
public class StoragePartItem extends Item {
|
||||
public StoragePartItem() {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB));
|
||||
}
|
||||
|
||||
public static StoragePartItem getByType(ItemStorageType type) {
|
||||
|
@@ -16,7 +16,7 @@ public class UpgradeItem extends Item {
|
||||
private final Type type;
|
||||
|
||||
public UpgradeItem(Type type) {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB));
|
||||
|
||||
this.type = type;
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ public class WirelessCraftingMonitorItem extends NetworkItem {
|
||||
private final Type type;
|
||||
|
||||
public WirelessCraftingMonitorItem(Type type) {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessCraftingMonitor().getCapacity());
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessCraftingMonitor().getCapacity());
|
||||
|
||||
this.type = type;
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ public class WirelessFluidGridItem extends NetworkItem {
|
||||
private final Type type;
|
||||
|
||||
public WirelessFluidGridItem(Type type) {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessFluidGrid().getCapacity());
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessFluidGrid().getCapacity());
|
||||
|
||||
this.type = type;
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ public class WirelessGridItem extends NetworkItem {
|
||||
private final Type type;
|
||||
|
||||
public WirelessGridItem(Type type) {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessGrid().getCapacity());
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessGrid().getCapacity());
|
||||
|
||||
this.type = type;
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ import net.minecraftforge.items.ItemHandlerHelper;
|
||||
|
||||
public class WrenchItem extends Item {
|
||||
public WrenchItem() {
|
||||
super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1));
|
||||
super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -14,7 +14,7 @@ public class ControllerBlockItem extends EnergyBlockItem {
|
||||
private final Component displayName;
|
||||
|
||||
public ControllerBlockItem(ControllerBlock block, DyeColor color, Component displayName) {
|
||||
super(block, new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1), block.getType() == NetworkType.CREATIVE, () -> RS.SERVER_CONFIG.getController().getCapacity());
|
||||
super(block, new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1), block.getType() == NetworkType.CREATIVE, () -> RS.SERVER_CONFIG.getController().getCapacity());
|
||||
|
||||
if (color != ColorMap.DEFAULT_COLOR) {
|
||||
this.displayName = new TranslatableComponent("color.minecraft." + color.getName())
|
||||
|
@@ -35,7 +35,7 @@ public class FluidStorageBlockItem extends BaseBlockItem {
|
||||
private final FluidStorageType type;
|
||||
|
||||
public FluidStorageBlockItem(FluidStorageBlock block) {
|
||||
super(block, new Item.Properties().tab(RS.MAIN_GROUP));
|
||||
super(block, new Item.Properties().tab(RS.CREATIVE_TAB));
|
||||
|
||||
this.type = block.getType();
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@ public class PortableGridBlockItem extends EnergyBlockItem {
|
||||
public PortableGridBlockItem(Type type) {
|
||||
super(
|
||||
type == Type.CREATIVE ? RSBlocks.CREATIVE_PORTABLE_GRID.get() : RSBlocks.PORTABLE_GRID.get(),
|
||||
new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1),
|
||||
new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1),
|
||||
type == Type.CREATIVE,
|
||||
() -> RS.SERVER_CONFIG.getPortableGrid().getCapacity()
|
||||
);
|
||||
|
@@ -32,7 +32,7 @@ public class StorageBlockItem extends BaseBlockItem {
|
||||
private final ItemStorageType type;
|
||||
|
||||
public StorageBlockItem(StorageBlock block) {
|
||||
super(block, new Item.Properties().tab(RS.MAIN_GROUP));
|
||||
super(block, new Item.Properties().tab(RS.CREATIVE_TAB));
|
||||
|
||||
this.type = block.getType();
|
||||
}
|
||||
|
@@ -6,8 +6,8 @@ import com.refinedmods.refinedstorage.util.ColorMap;
|
||||
import net.minecraft.world.item.CreativeModeTab;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
public class MainItemGroup extends CreativeModeTab {
|
||||
public MainItemGroup() {
|
||||
public class MainCreativeTab extends CreativeModeTab {
|
||||
public MainCreativeTab() {
|
||||
super(RS.ID);
|
||||
}
|
||||
|
@@ -95,7 +95,7 @@ public class ColorMap<T extends IForgeRegistryEntry<? super T>> {
|
||||
block.getId().getPath(),
|
||||
() -> new ColoredBlockItem(
|
||||
block.get(),
|
||||
new Item.Properties().tab(RS.MAIN_GROUP),
|
||||
new Item.Properties().tab(RS.CREATIVE_TAB),
|
||||
color,
|
||||
BlockUtils.getBlockTranslation(translationBlock.get())
|
||||
)
|
||||
|
Reference in New Issue
Block a user