Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

xwerswoodx

Forge Modder
  • Content Count

    80
  • Joined

  • Last visited

Community Reputation

8 Neutral

About xwerswoodx

  • Rank
    Stone Miner

Converted

  • Gender
    Male
  • Location
    London, United Kingdom
  • MSN Messenger
    lei_xwerswoodx@hotmail.com
  • Personal Text
    Apprentice Forge Modder

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I know MobEffects initialization. But he asked about "I've seen around the internet that they go Potion.getPotionByID(), or was it PotionEffect.getPotionByID()? Either way, it doesn't seem to be supported here." So I answered him same way. Sorry bro but knowing "MobEffects" init doesn't make you good or bad modder. Anyway here is the code with "MobEffects" for "GOOD" mooders... player.addPotionEffect(new PotionEffect(MobEffects.POISON, 100, 0));
  2. player.addPotionEffect(new PotionEffect(Potion.getPotionById(19), 100, 0)); Here is the example. 19 is id of potion which is equals to Poison, 100 is duration of potion 20ticks per second, so 100 is equals to 5 seconds. and 0 is a level of potion. (zero-based) so if you type 2 for level, it equals level 3 potion effect. You can get ids from net.minecraft.potion.Potion.java.
  3. player.sendMessage(new TextComponentString("This is sendmessage example string."));
  4. Here is my basic ConfigHandler class, maybe help you. package net.xwerswoodx.vrenchant; import java.io.File; import net.minecraftforge.common.config.ConfigCategory; import net.minecraftforge.common.config.Configuration; public class ConfigHandler { public static Configuration config; private static String file = "config/modID.cfg"; public static void init() { config = new Configuration(new File(file)); try { config.load(); } catch (Exception e) { System.out.println("Cannot load configuration file!"); } finally { config.save(); } } /* * Removes specific
  5. I don't know if it's possible to get from UUID from offline player (I haven't tried it before) but you can save player uuid to configuration file when he logged in server first time, and you can check his nickname from configuration file. If I remember correct, playerLoginEvent or LoggedIn event could be suitable for this.
  6. public class EmeraldArmor extends ItemArmor { public addarmor(String name, int index, int type) { super(yourmainclass.ArmorMaterial_EMERALD, index, type); this.setCreativeTab(CreativeTabs.tabCombat); this.setUnlocalizedName(name); GameRegistry.registerItem(this, name); } @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { if (slot == 2) { return yourmodid + ":textures/models/armor/emerald_layer_2.png"; } else { return yourmodid + ":textures/models/armor/emerald_layer_1.png"; } } } To the main code: public static ArmorMate
  7. if you didn't change your mod Id was examplemod I remember, you need to check public Static MODID from your main class, because it works for me
  8. You need to change this sections; version = "1.8-11.14.1.1334" group= "net.extend.mod" archivesBaseName = "extend" group should be same with your main class folder and extend should be your modid.
  9. I am waiting for this too, but it hasn't fixed yet or maybe I didn't see.
  10. This is helpful for me thanks for this, I remove sideonly, but it still not working. //I solved it, I can delete topic but maybe someone will make same mistake so I can explain, I used EntityPlayer for onUpdate but have to use Entity. So I change my code; public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) { if (entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; if (player.inventory.hasItem(stack.getItem())) { Minecraft mc = FMLClientHandler.instance().getClient(); update(mc); } } }
  11. I am trying to tick item. But onUpdate never works, how is it work? I try this; @SideOnly(Side.CLIENT) public void onUpdate(ItemStack stack, World world, EntityPlayer player, int par4, boolean par5) { if (player.inventory.hasItem(stack.getItem())) { outStream = new BufferedWriter(new FileWriter(new File("hamit.txt"), true)); outStream.write("onUpdate!"); outStream.newLine(); outStream.close(); } } But it never write onUpdate! in hamit.txt, I try to walk, run, right click, left click... How can I fix it? I can use onPlayerTick but it affect all items with same id,
  12. Ok I did what did you say Change my code to: ModelResourceLocation location = new ModelResourceLocation(ref.uid, "inventory"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(itemref.ironX, 0, location); texture isn't work. I changed it ModelResourceLocation location = new ModelResourceLocation(ref.uid + ":ironx", "inventory"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(itemref.ironX, 0, location); Texture works. I changed it to; ModelResourceLocation location = new ModelResourceLocation(ref.
  13. For 1.7.10 import cpw.mods.fml.common.Mod; For 1.8.0 import net.minecraftforge.fml.common.Mod; Can you try import Mod manually?
  14. You don't use quotation marks before @mod and after it. If it is work older versions, it can be because forge isn't support java 8 versions yet, but it doesn't cause @Mod error, it just not compile codes and crash game, if you use " before @Mod and at the end of the line, it can be error. @Mod(modid = "LetsMod", name = "Lets Mod", version = "1.0-1.7.10") If you don't have quotation marks I don't know why it gives error, maybe someone help you.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.