Jump to content

Failender

Forge Modder
  • Posts

    1091
  • Joined

  • Last visited

Everything posted by Failender

  1. I just created my own BlockContainer. Problem is, it is'nt rendering. If I make my block extend Block it's rendering fine, when I put BlockContainer it refuses to render. public class BlockBase extends BlockContainer{ public BlockBase() { super(Material.iron); setUnlocalizedName("blockbase"); setCreativeTab(CreativeTabs.tabBlock); } @Override public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntityBase(); } Link to the image http://www.directupload.net/file/d/3904/jjzj537h_png.htm Any help would be appreciated. Greetz Fail
  2. @SubscribeEvent public void onPlayerJoin(PlayerLoggedInEvent event) { if (!event.player.worldObj.isRemote) { event.player.inventory.addItemStackToInventory(new ItemStack(Items.stick)); } } Ur welcome
  3. Thank you verry much diesieben07, it works now! I am using this with forge because I dont think there is a version of Forge and Bukkit for 1.8, or am I wrong?
  4. I guess you are looking for this ClientRegistry.registerKeyBinding(key); Greetz Fail
  5. I only know it for 1.8 but this should help you, where the methods are called "onBlockDestroyedByPlayer" and "onBlockDestroyedByExplosion" Look for the method onBlockDestroyed. You should override this one. Just type in onBlock and let eclipse do the auto complete for you Greetz Fail
  6. Hello Folks, I am working on my own mod. One of the features I want to impelement is a teleport (home/sethome) command. I got everything to work if cheats are allowed, but my command wont work if cheats are disabled. I also overwrote the getRequiredPermissionLevel, but that doesn't seem to help Here's the code for the execute @Override public void execute(ICommandSender sender, String[] args) throws CommandException { if (sender instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) sender; HomeHelper.setHome(player.getName(), player.getPosition()); sender.addChatMessage(new ChatComponentText("home set")); try { HomeHelper.safeDataToFile(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } And the override @Override public int getRequiredPermissionLevel() { return 0; } Any help would be appreciated. Greetz Fail
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.