nosingleplayer 1.1.1: fond custom via blit + log debug widgets
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
|
||||
package net.paladrill.paladrillmod.item;
|
||||
|
||||
import net.paladrill.paladrillmod.creativetab.TabPalaDrillMod;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.client.event.ModelRegistryEvent;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ItemGoldMixedCoal extends ElementsPaladrillmodMod.ModElement {
|
||||
@GameRegistry.ObjectHolder("paladrillmod:gold_mixed_coal")
|
||||
public static final Item block = null;
|
||||
public ItemGoldMixedCoal(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 313);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initElements() {
|
||||
elements.items.add(() -> new ItemCustom());
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerModels(ModelRegistryEvent event) {
|
||||
ModelLoader.setCustomModelResourceLocation(block, 0, new ModelResourceLocation("paladrillmod:gold_mixed_coal", "inventory"));
|
||||
}
|
||||
public static class ItemCustom extends Item {
|
||||
public ItemCustom() {
|
||||
setMaxDamage(0);
|
||||
maxStackSize = 64;
|
||||
setUnlocalizedName("gold_mixed_coal");
|
||||
setRegistryName("gold_mixed_coal");
|
||||
setCreativeTab(TabPalaDrillMod.tab);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemEnchantability() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack itemstack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDestroySpeed(ItemStack par1ItemStack, IBlockState par2Block) {
|
||||
return 1F;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user