
ashtonr12
Members-
Posts
479 -
Joined
-
Last visited
Everything posted by ashtonr12
-
i tried to add this but it didnt work? i tired to put his code in and i finally got it to work without an error but it simply didnt do anything?
-
then what do you suggest?
-
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
-
Can someone show me an example of how i can do this? i do not understand the one that the first person tried to tell me
-
where should i put my overlay and how do i link it in? i tried to do this part myself but im not doing it right
-
thanks mate that is amazing!
-
anywhat that doesnt work it only gives me the potion effect when i have either the hat or plate on , i would like ti so that if any part of the set is omitted the potion effect no longer activates
-
Its ok thats great! i will just cover them completely and call it a feature! thats what mojang does anyways! What is the size of the image?
-
i watched you videos your totally like famous!
-
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 i was just wondering if it is possible to change the black squidy areas?
-
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
-
i couldnt find a method to give an item eg a pike extended reach when the player is holding it, i guess its to do with the servertickhandler but not sure exaclty
-
i think i can live without the overlay im not an advanced modder and this sounds very complicated also i dont want to extend the base classes
-
example code maybe if you figure it out? Anyone else got any ideas? thanks for the help anyway i will look at that gui code :0
-
how do you add them? i can find no tutorials or help online, so im hoping someone here will know, i tried looking at the Block.pumkin class but i could isolate the helmet overlay.
-
I couldnt get the code you gave me to work?
-
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.)
-
the help is gratefully accepted and it is now working, i knew it was something silly
-
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
-
Yes, i was thinking about this, probably onServerTick Class but i am not sure of how the method would work? if you dont know dont worry i will investigate it later
-
thankyou i was wondering if it was also possible to make it so that when i am using "ModdedPickaxe" i have potio effect miningspeed increase potion effect?
-
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
-
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