Skip to content

Instantly share code, notes, and snippets.

package com.example.examplemod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
This is Forge Mod Loader.
You can find the source code at all times at https://github.com/MinecraftForge/FML
This minecraft mod is a clean open source implementation of a mod loader for minecraft servers
and minecraft clients.
The code is authored by cpw.
It began by partially implementing an API defined by the client side ModLoader, authored by Risugami.
package ru.nord.common.items;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import ru.nord.NordItems;
import ru.nord.NordTabs;
package ru.nord.common.lib.helpers;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.fml.common.registry.GameRegistry;
import ru.nord.Nord;
public class RegisterHelper {
public static void registerSingleBlock(Block block, String name) {
package com.lionzxy.mysticalislands.gun;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraftforge.common.util.Constants;
/**
package com.lionzxy.mysticalislands.gun;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
package com.lionzxy.mysticalislands.gun;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
package com.lionzxy.mysticalislands.gun;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import mods.MTUtils
//Items:
MTUtils.setItemMaxDamage(itemstack, damage);
MTUtils.getItemMaxDamage(itemstack); (Return int)
MTUtils.getItemDamage(itemstack); (Return int)
Blocks
MTUtils.setHarvestLevel(itemstack, String tooltip, int harvestLevel);
MTUtils.setBlockUnbreakable(itemstack);
MTUtils.setHardness(itemstack, float hardness;
MTUtils.setLightLevel(itemstack, float lightLevel);
[
{
"name": "bronzeHammer",
"BreakRadius": 1,
"HarvestLevel": 2,
"Speed": 6,
"Durability": 2250,
"AttackDamage": 5,
"Enchant": 5,
"RepairMaterial": "ingotBronze",