1

Programming help, please

irishdragon47 12/10/13 11:13 am
148
12/10/2013 1:20 pm
I've been having a problem since last night and I can't figure out what's wrong. This code seems correct, at least enough to get it to load on Minecraft. I've tried taking the code for damage to mobs and players and making it a comment (//Such and such comment) to see if that helped, but it still won't load in the creative inventory. Here it is:

Click to reveal
package eclipse7.warhammer.blocks;

import eclipse7.warhammer.common.warhammer;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFence;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;

public class BlockBarbedWire extends Block{

public BlockBarbedWire(int par1, Material par2Material) {
super(par1, par2Material);
this.setCreativeTab(warhammer.TabWarhammer);
}


public void registerIcons(IconRegister iconRegister) {
blockIcon = iconRegister.registerIcon("Warhammer:BarbedWire");
}
public boolean isOpaqueCube() {
return false;
}

public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) {
par5Entity.attackEntityFrom(DamageSource.inWall, 1.0F);
}






}
Posted by
irishdragon47
Level 3 : Apprentice Crafter
2

  Have something to say?

JoinSign in

3

irishdragon47
12/10/2013 1:20 pm
Level 3 : Apprentice Crafter
Thank you, I haven't had enough practice with creating blocks. Fixed.
1
MMM_MasterM
12/10/2013 11:16 am
Level 67 : High Grandmaster System
GameRegistry.registerBlock
1
BreakfastPizza
12/10/2013 11:15 am
Level 19 : Journeyman Toast
Wait. Is this a mod, or a plugin?
1

Welcome