Jump to content

ashtonr12

Members
  • Posts

    479
  • Joined

  • Last visited

Posts posted by ashtonr12

  1. so that you have to be wearing all four peices of the armour set to get the effect

    e.g

     

    helmet+plate+legs+boots = potion.moveslowness

    plate+Legs+Boots = no potion effect

    helmet + legs + plate = no potion effect

    boots + plate = no potion effect

     

    etc

  2. WOW!

    you must be very advanced at this if you came up with that!

    is it possible to change the overlay? to say a see through circle in the middle and  black area around the outside?

    i also notice that the item bar is behind the overlay? and when you put on a pumkin head the item bar is infront of the overlay?

    dont misunderstand me i am immensly gratefull :D i was just wondering if it is possible to change the black squidy areas?

  3. ok so i am slightly confused, probably because i am so tired. Thanks for all your help so far.

    Is is possible without editing the base minecraft files to add a custom overlay to my self created helmet?

    if yes how? example code or suggestions?

    if no thanks for your help so far :)

     

  4. This is my current ServerTickHandler file;

     

    package ashtonsmod.common;

     

    import java.util.EnumSet;

     

    import net.minecraft.entity.player.EntityPlayer;

    import net.minecraft.item.ItemStack;

    import net.minecraft.potion.Potion;

    import net.minecraft.potion.PotionEffect;

    import cpw.mods.fml.common.ITickHandler;

    import cpw.mods.fml.common.TickType;

     

    public class ServerTickHandler implements ITickHandler {

     

    private void onPlayerTick(EntityPlayer player) {

    if (player.getCurrentItemOrArmor(4) != null ) {

    ItemStack helmet = player.getCurrentItemOrArmor(4);

    ItemStack chest = player.getCurrentItemOrArmor(3);

    ItemStack legs = player.getCurrentItemOrArmor(2);

     

    if (helmet.getItem() == ashtonsmod.ObsidianHelmet ) {

    player.addPotionEffect((new PotionEffect(Potion.moveSlowdown.getId(), 25, 1)));

     

    }

    }

    if(player.getCurrentItemOrArmor(1) != null){

    ItemStack boots = player.getCurrentItemOrArmor(1);

    if(boots.getItem() == ashtonsmod.ObsidianBoots){

    player.addPotionEffect((new PotionEffect(Potion.moveSlowdown.getId(), 25, 1)));

    }}

    if(player.getCurrentItemOrArmor(2) != null){

    ItemStack legs = player.getCurrentItemOrArmor(2);

    if(legs.getItem() == ashtonsmod.ObsidianLegs){

    player.addPotionEffect((new PotionEffect(Potion.moveSlowdown.getId(), 25, 1)));

    }}

     

    if(player.getCurrentItemOrArmor(3) != null){

    ItemStack plate = player.getCurrentItemOrArmor(3);

    if(plate.getItem() == ashtonsmod.ObsidianPlate){

    player.addPotionEffect((new PotionEffect(Potion.moveSlowdown.getId(), 25, 1)));

    }}}

     

     

     

    @Override

    public void tickStart(EnumSet<TickType> type, Object... tickData)

    {

      if (type.equals(EnumSet.of(TickType.PLAYER)))

      {

        onPlayerTick((EntityPlayer)tickData[0]);

      }

    }

     

    @Override

    public EnumSet<TickType> ticks()

    {

      return EnumSet.of(TickType.PLAYER, TickType.SERVER);

    }

     

    @Override

    public void tickEnd(EnumSet<TickType> type, Object... tickData) {

    }

     

     

    @Override

    public String getLabel() {

    return null;

    }

     

    }

     

     

    This currently says that if i put on obsidian armour (helmet or plate or boots or legs) it gives me slowness effect, how would i go about making it so that when i put on obsidian armour (helmet and plate and boots and legs) it gives me the potion effect? (ignore any missing } i cut out a small part of code.)

  5. Idofindthat example code helps me the most becasue then i can be 100% sure that i amcorrect in it and i can refer to it later on if i have problems :) i have already got a method for adding potion effects to armours i will post itlater for you to scan over but i am wondering if it is a similar method with just tools instead of armours. On another note the way i have handled armours is so that if you are wearing helmet or plate or legs or boots you get potion slowness (for example) i was wondering if there was a way for me to have it so that it is when you are wearing helmet and plate and boots and legs.

    thankyou :)

  6. I was wondering how i would go about giving a tool and enchantment without having to enchant it, ie when you craft it it comes with an enchantment, sort of like how you can make armour give a potion effect when worn in the armour slots?

    some example code would be usefull or any constuctive help at all :)

  7. hi, i am making a new mod in minecraft and it all works in ssp, but as soon as i try and run a server or open a Lan world it crashes, i will paste the error log at the bottom of this post. i am probably doing something really stupid. As far as i can tell i am missing an important class file but i do not know where i am meant to put this file and what in it. any help is appreaciated.

     

    [iNFO] Starting minecraft server version 1.4.6

    [sEVERE] Encountered an unexpected exception LoaderException

    cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: ashtonsmod.common.CommonProxy.ashtonsmod

    at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:69)

    at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:455)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

    at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

    at com.google.common.eventbus.EventBus.post(EventBus.java:268)

    at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

    at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

    at com.google.common.eventbus.EventBus.post(EventBus.java:268)

    at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)

    at cpw.mods.fml.common.Loader.loadMods(Loader.java:478)

    at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:86)

    at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:345)

    at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:64)

    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:458)

    at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)

    Caused by: java.lang.ClassNotFoundException: ashtonsmod.common.CommonProxy.ashtonsmod

    at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:179)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:57)

    at java.lang.Class.forName0(Native Method)

    at java.lang.Class.forName(Unknown Source)

    at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:52)

    ... 27 more

    Caused by: java.lang.NullPointerException

    at org.objectweb.asm.ClassReader.<init>(Unknown Source)

    at net.minecraftforge.transformers.EventTransformer.transform(EventTransformer.java:29)

    at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:222)

    at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:171)

    ... 33 more

    [sEVERE] This crash report has been saved to: C:\Users\owner\Desktop\Modding\jars\.\crash-reports\crash-2013-03-05_12.36.14-server.txt

×
×
  • Create New...

Important Information

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