Skip to content
Permalink
Browse files

Review and final cleanup

  • Loading branch information...
alcatrazEscapee committed Aug 26, 2018
1 parent ea93b92 commit 0e4bc3559d932d9a68775c0fe6eaecb1a68e9c03
@@ -6,19 +6,16 @@

package net.dries007.tfc.objects.items;

import javax.annotation.ParametersAreNonnullByDefault;
import javax.annotation.Nonnull;

import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;

import mcp.MethodsReturnNonnullByDefault;
import net.dries007.tfc.api.capability.size.IItemSize;
import net.dries007.tfc.api.capability.size.Size;
import net.dries007.tfc.api.capability.size.Weight;

@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
public class ItemBlockTFC extends ItemBlock implements IItemSize
{

@@ -28,13 +25,13 @@ public ItemBlockTFC(Block b)
}

@Override
public Size getSize(ItemStack stack)
public Size getSize(@Nonnull ItemStack stack)
{
return Size.VERY_SMALL;
}

@Override
public Weight getWeight(ItemStack stack)
public Weight getWeight(@Nonnull ItemStack stack)
{
return Weight.HEAVY;
}
@@ -7,17 +7,14 @@

import java.util.HashMap;
import java.util.Map;
import javax.annotation.ParametersAreNonnullByDefault;
import javax.annotation.Nonnull;

import net.minecraft.item.ItemStack;

import mcp.MethodsReturnNonnullByDefault;
import net.dries007.tfc.api.capability.size.Size;
import net.dries007.tfc.api.capability.size.Weight;
import net.dries007.tfc.api.types.Rock;

@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
public final class ItemFlat extends ItemTFC
{
private static final Map<Rock, ItemFlat> ROCK_MAP = new HashMap<>();
@@ -36,13 +33,13 @@ public ItemFlat(Rock rock)
}

@Override
public Size getSize(ItemStack stack)
public Size getSize(@Nonnull ItemStack stack)
{
return Size.NORMAL;
}

@Override
public Weight getWeight(ItemStack stack)
public Weight getWeight(@Nonnull ItemStack stack)
{
return Weight.MEDIUM;
}
@@ -6,17 +6,14 @@

package net.dries007.tfc.objects.items;

import javax.annotation.ParametersAreNonnullByDefault;
import javax.annotation.Nonnull;

import net.minecraft.item.ItemStack;

import mcp.MethodsReturnNonnullByDefault;
import net.dries007.tfc.api.capability.size.IItemSize;
import net.dries007.tfc.api.capability.size.Size;
import net.dries007.tfc.api.capability.size.Weight;

@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
public class ItemMisc extends ItemTFC implements IItemSize
{
private final Size size;
@@ -30,13 +27,13 @@ public ItemMisc(Size size, Weight weight)
}

@Override
public Size getSize(ItemStack stack)
public Size getSize(@Nonnull ItemStack stack)
{
return size;
}

@Override
public Weight getWeight(ItemStack stack)
public Weight getWeight(@Nonnull ItemStack stack)
{
return weight;
}
@@ -120,7 +120,7 @@ public static void registerItems(RegistryEvent.Register<Item> event)
for (Metal metal : TFCRegistries.METALS.getValuesCollection())
{
if (!type.hasType(metal) || type.supplier == null) continue;
simpleItems.add(register(r, "metal/" + type + "/" + metal.getRegistryName().getPath(), type.supplier.apply(metal, type), CT_METAL));
simpleItems.add(register(r, "metal/" + type.name().toLowerCase() + "/" + metal.getRegistryName().getPath(), type.supplier.apply(metal, type), CT_METAL));
}
}

@@ -45,7 +45,7 @@

public static final int STRAW_NEEDED = 8;
public static final int WOOD_NEEDED = 8;
public static final int BURN_TICKS = 200;//8000; // 8 In-game Hours // todo: put back
public static final int BURN_TICKS = 8000; // 8 In-game Hours
private final NonNullList<ItemStack> logs = NonNullList.withSize(WOOD_NEEDED, ItemStack.EMPTY);
private final NonNullList<ItemStack> straw = NonNullList.withSize(STRAW_NEEDED, ItemStack.EMPTY);
private final NonNullList<ItemStack> items = NonNullList.withSize(4, ItemStack.EMPTY);

0 comments on commit 0e4bc35

Please sign in to comment.
You can’t perform that action at this time.