Jump to content

Aquillian

Members
  • Posts

    17
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Aquillian's Achievements

Tree Puncher

Tree Puncher (2/8)

6

Reputation

  1. To register an achievement public static Achievement achievementName; in your FMLInitializationEvent func new Achievement(unLocalizedName, achievement name(used when adding an achievement on to it) , x, y, ItemStack(icon), (Achievement)parent(group)) achievementName = new Achievement("achievement.achievementName", "achievementName", 0, 0, Blocks.stone, (Achievement)null).registerStat(); then in your PickupHandler if(event.pickedUp.getEntityItem().isItemEqual(new ItemStack(Your item or block))){ System.out.println("Aquired. ..."); event.player.addStat(ModClass.achievementName , 1); }
  2. This work for me. if(event.world.getBlockId(event.X, event.Y, event.Z) == ScienceBase.TestingCrop.blockID){ (ScienceBase.TestingCrop).fertilize(event.world, event.X, event.Y, event.Z, event.entityPlayer); }
  3. Any Editing of Base Classes will be undone by forge if you release the mod since removing anything from vanilla Minecraft is bad and could/ would cause major conflicts with other mods.
  4. are you using forge api + ModLoader or you have made a mod in ModLoader and are placing in the clients side mod folder. cause to use ModLoader in forge you will need to import it import net.minecraft.src.BaseMod; import net.minecraft.src.ModLoader; and then use the normal code you have.
  5. Forge fully supports ModLoader Mods and even includes ModLoader as part of the api. your only issue may come from item/ block conflicts since ModLoader only supports 256 block ids and forge increase that.
  6. http://www.minecraftforge.net/forum/index.php?topic=1303.0 this post may also be helpful to you
  7. when you say patch are you offering it as a patch to an allready availble mod or are you trying to patch a core file? also :- && = AND || = OR
  8. net.minecraft.item.Item.Java Line 212 = public final int shiftedIndex;
  9. Even that would still require a core code change since you would need to add s subtype to the BlockStone class
  10. public int getTabIconItemIndex() { return MoreCraft.OBSIDIAN_PEARL.shiftedIndex; } you need to add the shiftedIndex
  11. @Override @SideOnly(Side.CLIENT) public ItemStack getIconItemStack() { return new ItemStack(MoreCraft .OBSIDIAN_PEARL); } should fix it.
  12. This is how i would do it. public class FallFood extends ItemFood { private final String setInfo; private final String setColor; public FallFood (int par1, int par2, float f, boolean par3) { super(par1, par2, par3) ; setCreativeTab(CreativeTabs.tabMaterials); this.setInfo = "It smells weird"; this.setColor = "\u00A7a"; } public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean bool) { list.add(setToolTipData()); } private String setToolTipData(){ return this.setColor + this.setInfo; } public String getTextureFile() { return"/gemstone_mod/Items.png"; } } hopefully this gets you on track and color refrence
  13. WoW if your looking to override a core block then Forge may not be the API for you since the purpose of the API is there to negate the need to change core code and override existing id's.
  14. public boolean onBlockActivated(World world, int xCoord, int yCoord, int zCoord, EntityPlayer entityPlayer, int par6, float par7, float par8, float par9) { entityPlayer.capabilities.allowFlying = true; entityPlayer.motionY += 1.0; entityPlayer.capabilities.isFlying = true; entityPlayer.fallDistance = 0; return true; } works for me
×
×
  • Create New...

Important Information

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