Skip to content
Permalink
Browse files

Fixed small ores not smelting

  • Loading branch information...
DisasterMoo committed Jul 20, 2019
1 parent f67d8f9 commit b526260c5e2c3f4cbb7ec37700e7594b17d3418b
@@ -147,12 +147,15 @@ public static void registerItems(RegistryEvent.Register<Item> event)
{
Builder<ItemOreTFC> b = new Builder<>();
for (Ore ore : TFCRegistries.ORES.getValuesCollection())
{
b.add(register(r, "ore/" + ore.getRegistryName().getPath(), new ItemOreTFC(ore), CT_ROCK_ITEMS));
allOreItems = b.build();

for (Ore ore : TFCRegistries.ORES.getValuesCollection())
if (ore.isGraded())
{
simpleItems.add(register(r, "ore/small/" + ore.getRegistryName().getPath(), new ItemSmallOre(ore), CT_ROCK_ITEMS));
}
}
allOreItems = b.build();

}

{
@@ -8,9 +8,13 @@
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.capabilities.ICapabilityProvider;

import net.dries007.tfc.api.capability.heat.ItemHeatHandler;
import net.dries007.tfc.api.capability.size.Size;
import net.dries007.tfc.api.capability.size.Weight;
import net.dries007.tfc.api.types.Metal;
@@ -60,6 +64,13 @@ public int getSmeltAmount(ItemStack stack)
return 10; //todo: config
}

@Nullable
@Override
public ICapabilityProvider initCapabilities(ItemStack stack, @Nullable NBTTagCompound nbt)
{
return ore.getMetal() != null ? new ItemHeatHandler(nbt, ore.getMetal().getSpecificHeat(), ore.getMetal().getMeltTemp()) : null;
}

@Nonnull
@Override
public Size getSize(@Nonnull ItemStack stack)

0 comments on commit b526260

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