Needs more unused materials

- Added and hid a few items for future recipe changes
- Re-ordered the Creative Tab a little
This commit is contained in:
simibubi 2019-12-19 22:35:45 +01:00
parent 7d9d5307ab
commit d8ccfd844c
33 changed files with 177 additions and 34 deletions

View file

@ -41,26 +41,32 @@ import net.minecraftforge.registries.IForgeRegistry;
@EventBusSubscriber(value = Dist.CLIENT, bus = Bus.MOD)
public enum AllItems {
__CURIOSITIES__(),
SYMMETRY_WAND(new SymmetryWandItem(
standardItemProperties().setTEISR(() -> () -> renderUsing(AllItemRenderers.SYMMETRY_WAND)))),
PLACEMENT_HANDGUN(
new BuilderGunItem(new Properties().setTEISR(() -> () -> renderUsing(AllItemRenderers.BUILDER_GUN)))),
DEFORESTER(new DeforesterItem(
standardItemProperties().setTEISR(() -> () -> renderUsing(AllItemRenderers.DEFORESTER)))),
__MATERIALS__(),
COPPER_INGOT(ingredient()),
ZINC_CUBE(ingredient()),
ANDESITE_ALLOY_CUBE(ingredient()),
BRASS_CUBE(ingredient()),
COPPER_NUGGET(ingredient()),
ZINC_NUGGET(ingredient()),
BRASS_NUGGET(ingredient()),
IRON_SHEET(ingredient()),
GOLD_SHEET(ingredient()),
ANDESITE_ALLOY_CUBE(ingredient()),
BLAZE_BRASS_CUBE(ingredient()),
CHORUS_CHROME_CUBE(ingredient(Rarity.UNCOMMON)),
BRASS_SHEET(ingredient()),
BLAZE_BRASS_CUBE(new Item(new Properties())),
CHORUS_CHROME_CUBE(new Item(new Properties().rarity(Rarity.UNCOMMON))),
SHADOW_STEEL_CUBE(new Item(new Properties().rarity(Rarity.UNCOMMON))),
ROSE_QUARTZ(new Item(new Properties())),
REFINED_ROSE_QUARTZ(new Item(new Properties())),
CHROMATIC_COMPOUND_CUBE(new ChromaticCompoundCubeItem(new Properties().rarity(Rarity.UNCOMMON))),
REFINED_RADIANCE_CUBE(new Item(new Properties().rarity(Rarity.UNCOMMON))),
CRUSHED_IRON(ingredient()),
CRUSHED_GOLD(ingredient()),
CRUSHED_COPPER(ingredient()),
CRUSHED_ZINC(ingredient()),
CRUSHED_BRASS(ingredient()),
// BLAZING_PICKAXE(new BlazingToolItem(1, -2.8F, standardProperties(), PICKAXE)),
// BLAZING_SHOVEL(new BlazingToolItem(1.5F, -3.0F, standardProperties(), SHOVEL)),
// BLAZING_AXE(new BlazingToolItem(5.0F, -3.0F, standardProperties(), AXE)),
@ -89,11 +95,8 @@ public enum AllItems {
FLOUR(ingredient()),
DOUGH(ingredient()),
PROPELLER(ingredient()),
WRENCH(new WrenchItem(standardItemProperties().setTEISR(() -> () -> renderUsing(AllItemRenderers.WRENCH)))),
GOGGLES(new GogglesItem(standardItemProperties())),
CRUSHED_IRON(ingredient()),
CRUSHED_GOLD(ingredient()),
WRENCH(new WrenchItem(standardItemProperties().setTEISR(() -> () -> renderUsing(AllItemRenderers.WRENCH))), true),
GOGGLES(new GogglesItem(standardItemProperties()), true),
__LOGISTICS__(),
CARDBOARD_BOX_1616(new CardboardBoxItem(standardItemProperties())),
@ -109,6 +112,15 @@ public enum AllItems {
LOGISTICAL_CONTROLLER_CALCULATION(new LogisticalControllerItem(standardItemProperties(), Type.CALCULATION)),
LOGISTICAL_CONTROLLER_TRANSACTIONS(new LogisticalControllerItem(standardItemProperties(), Type.TRANSACTIONS)),
__CURIOSITIES__(),
PLACEMENT_HANDGUN(
new BuilderGunItem(new Properties().setTEISR(() -> () -> renderUsing(AllItemRenderers.BUILDER_GUN))), true),
DEFORESTER(
new DeforesterItem(standardItemProperties().setTEISR(() -> () -> renderUsing(AllItemRenderers.DEFORESTER))),
true),
SYMMETRY_WAND(new SymmetryWandItem(
standardItemProperties().setTEISR(() -> () -> renderUsing(AllItemRenderers.SYMMETRY_WAND))), true),
;
private static class CategoryTracker {
@ -119,6 +131,7 @@ public enum AllItems {
public Item item;
public IModule module;
public boolean firstInCreativeTab;
private AllItems() {
CategoryTracker.currentModule = new IModule() {
@ -130,9 +143,14 @@ public enum AllItems {
}
private AllItems(Item item) {
this(item, false);
}
private AllItems(Item item, boolean firstInCreativeTab) {
this.item = item;
this.item.setRegistryName(Create.ID, Lang.asId(name()));
this.module = CategoryTracker.currentModule;
this.firstInCreativeTab = firstInCreativeTab;
}
public static Properties standardItemProperties() {
@ -155,7 +173,7 @@ public enum AllItems {
continue;
registry.register(item.get());
}
AllBlocks.registerItemBlocks(registry);
}

View file

@ -1,6 +1,7 @@
package com.simibubi.create;
import com.simibubi.create.foundation.block.IWithoutBlockItem;
import com.simibubi.create.foundation.item.IAddedByOther;
import net.minecraft.block.Block;
import net.minecraft.item.ItemGroup;
@ -17,18 +18,15 @@ public final class CreateItemGroup extends ItemGroup {
public ItemStack createIcon() {
return new ItemStack(AllBlocks.COGWHEEL.get());
}
@Override
public void fill(NonNullList<ItemStack> items) {
for (AllItems item : AllItems.values()) {
if (item.get() == null)
continue;
if (!item.module.isEnabled())
continue;
item.get().fillItemGroup(this, items);
}
addItems(items, true);
addBlocks(items);
addItems(items, false);
}
public void addBlocks(NonNullList<ItemStack> items) {
for (AllBlocks block : AllBlocks.values()) {
if (block.get() == null)
continue;
@ -36,10 +34,27 @@ public final class CreateItemGroup extends ItemGroup {
continue;
if (block.get() instanceof IWithoutBlockItem)
continue;
if (block.get() instanceof IAddedByOther)
continue;
block.get().asItem().fillItemGroup(this, items);
for (Block alsoRegistered : block.alsoRegistered)
alsoRegistered.asItem().fillItemGroup(this, items);
}
}
public void addItems(NonNullList<ItemStack> items, boolean prioritized) {
for (AllItems item : AllItems.values()) {
if (item.get() == null)
continue;
if (!item.module.isEnabled())
continue;
if (item.firstInCreativeTab != prioritized)
continue;
if (item.get() instanceof IAddedByOther)
continue;
item.get().fillItemGroup(this, items);
}
}
}

View file

@ -0,0 +1,5 @@
package com.simibubi.create.foundation.item;
public interface IAddedByOther {
}

View file

@ -5,6 +5,7 @@ import java.util.List;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.CreateConfig;
import com.simibubi.create.foundation.item.IAddedByOther;
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Part;
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Slope;
@ -23,7 +24,7 @@ import net.minecraft.util.Direction.AxisDirection;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public class BeltConnectorItem extends BlockItem {
public class BeltConnectorItem extends BlockItem implements IAddedByOther {
public BeltConnectorItem(Properties properties) {
super(AllBlocks.BELT.block, properties);

View file

@ -8,7 +8,10 @@ import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
@ -66,6 +69,10 @@ public class CogWheelBlock extends ShaftBlock {
return isLarge ? 1f : .75f;
}
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items) {
items.add(new ItemStack(this));
}
// IRotate
@Override

View file

@ -1,12 +1,16 @@
package com.simibubi.create.modules.contraptions.relays.elementary;
import com.simibubi.create.AllItems;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.modules.contraptions.base.RotatedPillarKineticBlock;
import net.minecraft.block.BlockState;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
@ -43,6 +47,12 @@ public class ShaftBlock extends RotatedPillarKineticBlock {
public float getParticleInitialRadius() {
return 0f;
}
@Override
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items) {
super.fillItemGroup(group, items);
AllItems.BELT_CONNECTOR.get().fillItemGroup(group, items);
}
// IRotate:

View file

@ -2,6 +2,7 @@ package com.simibubi.create.modules.logistics.management;
import java.util.UUID;
import com.simibubi.create.foundation.item.IAddedByOther;
import com.simibubi.create.foundation.item.IItemWithColorHandler;
import com.simibubi.create.modules.logistics.management.base.LogisticalActorTileEntity;
@ -17,7 +18,7 @@ import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.world.World;
public class LogisticalDialItem extends Item implements IItemWithColorHandler {
public class LogisticalDialItem extends Item implements IItemWithColorHandler, IAddedByOther {
public LogisticalDialItem(Properties properties) {
super(properties);

View file

@ -2,6 +2,7 @@ package com.simibubi.create.modules.logistics.management.base;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.Create;
import com.simibubi.create.foundation.item.IAddedByOther;
import com.simibubi.create.modules.logistics.management.base.LogisticalControllerBlock.Type;
import net.minecraft.item.BlockItem;
@ -9,7 +10,7 @@ import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
public class LogisticalControllerItem extends BlockItem {
public class LogisticalControllerItem extends BlockItem implements IAddedByOther {
private Type type;

View file

@ -14,12 +14,14 @@ import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.ISelectionContext;
@ -29,7 +31,8 @@ import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
import net.minecraftforge.fml.network.NetworkHooks;
public class LogisticalIndexBlock extends HorizontalBlock implements IBlockWithColorHandler, IWithTileEntity<LogisticalIndexTileEntity> {
public class LogisticalIndexBlock extends HorizontalBlock
implements IBlockWithColorHandler, IWithTileEntity<LogisticalIndexTileEntity> {
public LogisticalIndexBlock() {
super(Properties.from(Blocks.GRANITE));
@ -49,6 +52,17 @@ public class LogisticalIndexBlock extends HorizontalBlock implements IBlockWithC
super.fillStateContainer(builder);
}
@Override
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items) {
super.fillItemGroup(group, items);
AllItems[] logisiticalItems = new AllItems[] { AllItems.LOGISTICAL_DIAL, AllItems.LOGISTICAL_CONTROLLER_STORAGE,
AllItems.LOGISTICAL_CONTROLLER_SUPPLY, AllItems.LOGISTICAL_CONTROLLER_REQUEST,
AllItems.LOGISTICAL_CONTROLLER_CALCULATION, AllItems.LOGISTICAL_CONTROLLER_TRANSACTIONS };
for (AllItems item : logisiticalItems) {
item.get().fillItemGroup(group, items);
}
}
@Override
public BlockRenderLayer getRenderLayer() {
return BlockRenderLayer.CUTOUT_MIPPED;
@ -85,14 +99,14 @@ public class LogisticalIndexBlock extends HorizontalBlock implements IBlockWithC
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return new LogisticalIndexTileEntity();
}
@Override
public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn,
BlockRayTraceResult hit) {
if (AllItems.LOGISTICAL_DIAL.typeOf(player.getHeldItem(handIn))) {
return false;
}
if (worldIn.isRemote) {
return true;
} else {

View file

@ -29,6 +29,17 @@
"item.create.crushed_iron": "Crushed Iron Ore",
"item.create.crushed_gold": "Crushed Gold Ore",
"item.create.brass_cube": "Brass",
"item.create.brass_sheet": "Brass Sheets",
"item.create.brass_nugget": "Brass Nugget",
"item.create.crushed_brass": "Crushed Brass",
"item.create.zinc_cube": "Zinc Bar",
"item.create.zinc_nugget": "Zinc Nugget",
"item.create.crushed_zinc": "Crushed Zinc",
"item.create.copper_ingot": "Copper Ingot",
"item.create.copper_nugget": "Copper Nugget",
"item.create.crushed_copper": "Crushed Copper",
"item.create.logistical_controller_supply": "Item Supply",
"item.create.logistical_controller_request": "Item Request",
"item.create.logistical_controller_storage": "Item Storage",

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "create:item/brass_cube"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "create:item/brass_nugget"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "create:item/brass_sheet"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "create:item/copper_ingot"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "create:item/copper_nugget"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "create:item/crushed_brass"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "create:item/crushed_copper"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "create:item/crushed_zinc"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "create:item/zinc_cube"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "create:item/zinc_nugget"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

After

Width:  |  Height:  |  Size: 758 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 432 B

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 772 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B