• 0

    posted a message on Disabling Flight if Item is not in the inventory. **Solved**

    I changed it, and game wouldnt load, got this message



    ---- Minecraft Crash Report ----
    // Quite honestly, I wouldn't worry myself about that.
    
    Time: 12/16/15 6:37 PM
    Description: Initializing game
    
    java.lang.NullPointerException: Initializing game
    	at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:236)
    	at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:250)
    	at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:245)
    	at projectmayhem1983.wheeloftime.WheelOfTime.init(WheelOfTime.java:237)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:497)
    	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:497)
    	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    	at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
    	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:497)
    	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
    	at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737)
    	at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311)
    	at net.minecraft.client.Minecraft.startGame(Minecraft.java:597)
    	at net.minecraft.client.Minecraft.run(Minecraft.java:942)
    	at net.minecraft.client.main.Main.main(Main.java:164)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:497)
    	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    	at GradleStart.main(Unknown Source)
    
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Stacktrace:
    	at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:236)
    	at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:250)
    	at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:245)
    	at projectmayhem1983.wheeloftime.WheelOfTime.init(WheelOfTime.java:237)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:497)
    	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:497)
    	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    	at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
    	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:497)
    	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
    	at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737)
    	at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311)
    	at net.minecraft.client.Minecraft.startGame(Minecraft.java:597)
    
    -- Initialization --
    Details:
    Stacktrace:
    	at net.minecraft.client.Minecraft.run(Minecraft.java:942)
    	at net.minecraft.client.main.Main.main(Main.java:164)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:497)
    	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    	at GradleStart.main(Unknown Source)
    
    -- System Details --
    Details:
    	Minecraft Version: 1.7.10
    	Operating System: Windows 7 (amd64) version 6.1
    	Java Version: 1.8.0_66, Oracle Corporation
    	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    	Memory: 653128024 bytes (622 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
    	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    	AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    	FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active
    	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    	UCHI	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
    	UCHI	FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) 
    	UCHI	Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) 
    	UCHE	wot{1.0} [Wheel of Time] (bin) 
    	GL info: ' Vendor: 'ATI Technologies Inc.' Version: '3.3.11472 Compatibility Profile Context' Renderer: 'ATI Radeon HD 4550'
    	Launched Version: 1.7.10
    	LWJGL: 2.9.1
    	OpenGL: ATI Radeon HD 4550 GL version 3.3.11472 Compatibility Profile Context, ATI Technologies Inc.
    	GL Caps: Using GL 1.3 multitexturing.
    Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
    Anisotropic filtering is supported and maximum anisotropy is 16.
    Shaders are available because OpenGL 2.1 is supported.
    
    	Is Modded: Definitely; Client brand changed to 'fml,forge'
    	Type: Client (map_client.txt)
    	Resource Packs: []
    	Current Language: English (US)
    	Profiler Position: N/A (disabled)
    	Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    	Anisotropic Filtering: Off (1)
    Posted in: Modification Development
  • 0

    posted a message on Disabling Flight if Item is not in the inventory. **Solved**

    Register it where? maybe that is my original problem. Are you talking about in my main WheelOfTime.java file? I got an error today while flying around messing with it, said something about expecting a tick event, here is the error:



    ---- Minecraft Crash Report ----
    // I just don't know what went wrong :(
    
    Time: 12/15/15 7:44 PM
    Description: Ticking memory connection
    
    java.lang.IllegalArgumentException: bound must be positive
    	at java.util.Random.nextInt(Random.java:388)
    	at net.minecraftforge.common.ChestGenHooks.generateStacks(ChestGenHooks.java:111)
    	at net.minecraft.util.WeightedRandomChestContent.generateChestContent(WeightedRandomChestContent.java:99)
    	at net.minecraft.util.WeightedRandomChestContent.generateChestContents(WeightedRandomChestContent.java:44)
    	at net.minecraft.world.gen.feature.WorldGenDungeons.generate(WorldGenDungeons.java:133)
    	at net.minecraft.world.gen.ChunkProviderGenerate.populate(ChunkProviderGenerate.java:441)
    	at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:313)
    	at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1157)
    	at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:208)
    	at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:149)
    	at net.minecraft.server.management.PlayerManager$PlayerInstance.<init>(PlayerManager.java:405)
    	at net.minecraft.server.management.PlayerManager.getOrCreateChunkWatcher(PlayerManager.java:110)
    	at net.minecraft.server.management.PlayerManager.filterChunkLoadQueue(PlayerManager.java:193)
    	at net.minecraft.server.management.PlayerManager.updatePlayerPertinentChunks(PlayerManager.java:296)
    	at net.minecraft.server.management.ServerConfigurationManager.updatePlayerPertinentChunks(ServerConfigurationManager.java:337)
    	at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:430)
    	at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:37)
    	at net.minecraft.network.play.client.C03PacketPlayer$C04PacketPlayerPosition.processPacket(C03PacketPlayer.java:163)
    	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)
    	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
    	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
    	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
    	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
    	at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
    
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Stacktrace:
    	at java.util.Random.nextInt(Random.java:388)
    	at net.minecraftforge.common.ChestGenHooks.generateStacks(ChestGenHooks.java:111)
    	at net.minecraft.util.WeightedRandomChestContent.generateChestContent(WeightedRandomChestContent.java:99)
    	at net.minecraft.util.WeightedRandomChestContent.generateChestContents(WeightedRandomChestContent.java:44)
    	at net.minecraft.world.gen.feature.WorldGenDungeons.generate(WorldGenDungeons.java:133)
    	at net.minecraft.world.gen.ChunkProviderGenerate.populate(ChunkProviderGenerate.java:441)
    	at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:313)
    	at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1157)
    	at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:208)
    	at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:149)
    	at net.minecraft.server.management.PlayerManager$PlayerInstance.<init>(PlayerManager.java:405)
    	at net.minecraft.server.management.PlayerManager.getOrCreateChunkWatcher(PlayerManager.java:110)
    	at net.minecraft.server.management.PlayerManager.filterChunkLoadQueue(PlayerManager.java:193)
    	at net.minecraft.server.management.PlayerManager.updatePlayerPertinentChunks(PlayerManager.java:296)
    	at net.minecraft.server.management.ServerConfigurationManager.updatePlayerPertinentChunks(ServerConfigurationManager.java:337)
    	at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:430)
    	at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:37)
    	at net.minecraft.network.play.client.C03PacketPlayer$C04PacketPlayerPosition.processPacket(C03PacketPlayer.java:163)
    	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)
    
    -- Ticking connection --
    Details:
    	Connection: [email protected]
    Stacktrace:
    	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
    	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
    	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
    	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
    	at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
    
    -- System Details --
    Details:
    	Minecraft Version: 1.7.10
    	Operating System: Windows 7 (amd64) version 6.1
    	Java Version: 1.8.0_66, Oracle Corporation
    	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    	Memory: 717917872 bytes (684 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
    	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    	AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    	IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
    	FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active
    	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    	UCHIJAAAA	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
    	UCHIJAAAA	FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) 
    	UCHIJAAAA	Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) 
    	UCHIJAAAA	wot{1.0} [Wheel of Time] (bin) 
    	GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
    	Profiler Position: N/A (disabled)
    	Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    	Player Count: 1 / 8; [EntityPlayerMP['Player656'/89, l='New World', x=144.46, y=80.49, z=208.76]]
    	Type: Integrated Server (map_client.txt)
    	Is Modded: Definitely; Client brand changed to 'fml,forge'



    I just made my first animal mob, I wasn't sure if this error happened because it tried to load one up, or if it was from the flying Ter'Angreal checking to see if the item was there. I don't know a ton about java yet, but I know the java.util.RAndom.nextInt(Random.java:338) is suppose to tell me where the error occured right? I added these to the WheelOfTime.java

    ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(WheelOfTime.itemAngelta),1,0,1));
    		ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(WheelOfTime.itemFountainta),1,0,1));

    Since the second part of the error is talking about chest hooks I figured it may be this new addition. I did a ton of stuff yesterday so really unsure exactly what part caused it. I'm guessing mainly the ChestHook though. I wanted to add the Ter'Angreal to dungeon loot so they could be like lost artifacts, but if need be, i can remove that and just make them craftable. I'm gonna switch that bit of coding up on the Flying item, and wait for a response on exactly how to register the event handler. And thanks for the help :) This is a fun learning experience, I know this weekend I gotta learn how to get all this uploaded to GitHub so its easier for people to look at and help.

    Posted in: Modification Development
  • 0

    posted a message on Disabling Flight if Item is not in the inventory. **Solved**

    Still didn't work. Guess it's not too big of a deal, i doubt anyone would toss it away, and if they did, once you die or log out, it takes the flying away.

    Posted in: Modification Development
  • 0

    posted a message on Disabling Flight if Item is not in the inventory. **Solved**

    ok I'll try that now :)

    Posted in: Modification Development
  • 0

    posted a message on Armor Textures not showing

    You are a saint. Can't believe I didn't notice the extra "item" in the code. The armor shows up perfectly now! Well, almost, I textured the front side of the chest onto the back, so gotta go fix that, but other than that, its awesome!! Thank you for ending my suffering.

    Posted in: Modification Development
  • 0

    posted a message on Armor Textures not showing

    Still isn't working. My code now looks like this...


     

    package projectmayhem1983.wheeloftime.armor.whitecloak;
    
    import net.minecraft.client.renderer.texture.IIconRegister;
    import net.minecraft.entity.Entity;
    import net.minecraft.item.ItemArmor;
    import net.minecraft.item.ItemStack;
    import projectmayhem1983.wheeloftime.WheelOfTime;
    
    public class whitecloakArmor extends ItemArmor{
    	private String[] armourTypes = new String [] {"whitecloakHelm", "whitecloakChest", "whitecloakLegs", "whitecloakBoots"};
    		
    	public whitecloakArmor(ArmorMaterial armorMaterial, int renderIndex, int armourType){
    		super(armorMaterial, renderIndex, armourType);
    	}
    	@Override
    	public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer){
    		if     (stack.getItem() == (WheelOfTime.whitecloakHelm) || 
    				stack.getItem() == (WheelOfTime.whitecloakChest)||
    				stack.getItem() == (WheelOfTime.whitecloakBoots)){
    			return "wot:textures/models/armor/itemwhitecloak1.png";
    		}
    		if     (stack.getItem().equals(WheelOfTime.whitecloakLegs)){
    			return "wot:textures/models/armor/itemwhitecloak2.png";
    		}
    		else return null;
    	}
    	
    }






    I tried making the extra folders you have, and I tried with and without the .png at the end of the itemwhitecloak1 + itemwhitecloak2. And I tried with and without adding the extra .png on my texture (they show up as .png.png after I add the .png to the end. I included a snip of my Project Explorer so you can see I have the textures in the right spot

    Posted in: Modification Development
  • 0

    posted a message on Armor Textures not showing

    ok I thought so, the tutorial I followed first from MrCrayfish had me set them in the WheelOfTime.java like this...


     whitecloakHelm = new whitecloakArmor(WheelOfTime.enumArmorMaterialWhitecloak,5,0).setUnlocalizedName("ItemwhitecloakHelm").setTextureName("wot:itemwhitecloakhelm").setCreativeTab(tabWheelOfTime);
    	    GameRegistry.registerItem(whitecloakHelm, whitecloakHelm.getUnlocalizedName().substring(5));
    	    





    So, I'll remove those texture statements, and try changing the path to a complete path, then ill come back and let you know how it worked out.

    Posted in: Modification Development
  • 0

    posted a message on Armor Textures not showing


    Followed a tutorial here about adding armor and textures to the armor. I ended with this code. When I load into minecraft, the chestpiece is black with purple arms, everything else is black. I attached the two armor files to this post. They are in my textures/armors folder. And, as a quick question, if I setTextureName() in my WheelOfTime main java file, do I need the RegisterIcons() at the bottom? I was following MyCrayfish's tutorials, but he stopped 1.7.10 and moved onto 1.8 so I had to use different tutorials.


    package projectmayhem1983.wheeloftime.armor.whitecloak;
    
    import net.minecraft.client.renderer.texture.IIconRegister;
    import net.minecraft.entity.Entity;
    import net.minecraft.item.ItemArmor;
    import net.minecraft.item.ItemStack;
    import projectmayhem1983.wheeloftime.WheelOfTime;
    
    public class whitecloakArmor extends ItemArmor{
    	private String[] armourTypes = new String [] {"whitecloakHelm", "whitecloakChest", "whitecloakLegs", "whitecloakBoots"};
    		
    	public whitecloakArmor(ArmorMaterial armorMaterial, int renderIndex, int armourType){
    		super(armorMaterial, renderIndex, armourType);
    	}
    	@Override
    	public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer){
    		if     (stack.getItem().equals(WheelOfTime.whitecloakHelm) || 
    				stack.getItem().equals(WheelOfTime.whitecloakChest)||
    				stack.getItem().equals(WheelOfTime.whitecloakBoots)){
    			return "wot:itemwhitecloak1";
    		}
    		if     (stack.getItem().equals(WheelOfTime.whitecloakLegs)){
    			return "wot:itemwhitecloak2";
    		}
    		else return null;
    	}
    	@Override 
    	public void registerIcons(IIconRegister reg){
    		if(this == WheelOfTime.whitecloakHelm)
    			this.itemIcon = reg.registerIcon("wot:itemwhitecloakhelm");
    		if(this == WheelOfTime.whitecloakChest)
    			this.itemIcon = reg.registerIcon("wot:itemwhitecloakchest");
    		if(this == WheelOfTime.whitecloakLegs)
    			this.itemIcon = reg.registerIcon("wot:itemwhitecloaklegs");
    		if(this == WheelOfTime.whitecloakBoots)
    			this.itemIcon = reg.registerIcon("wot:itemwhitecloakboots");
    	}
    }
    Posted in: Modification Development
  • 0

    posted a message on Disabling Flight if Item is not in the inventory. **Solved**

    Nope. I can right click it to fly, and right click it again to drop down and no longer fly. But, after I toss the item, I do not lose flying. If I die or log out/in, I can no longer fly.

    Posted in: Modification Development
  • 0

    posted a message on Disabling Flight if Item is not in the inventory. **Solved**

    I changed the code in theAngelEventHandler to look like this:


    package taEventHandlers;
    
    import cpw.mods.fml.common.eventhandler.SubscribeEvent;
    import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.item.ItemStack;
    import net.minecraft.potion.Potion;
    import net.minecraft.potion.PotionEffect;
    import net.minecraft.world.World;
    import projectmayhem1983.wheeloftime.WheelOfTime;
    
    public class AngelEventHandler {
    
    	@SubscribeEvent
    	public void pTickEvent(PlayerTickEvent event) {
    		if (event.player != null) {
    			if (event.player instanceof EntityPlayer){
    				EntityPlayer player = ((EntityPlayer)event.player);
    				player.capabilities.allowFlying = player.capabilities.isFlying = player.inventory.hasItem(WheelOfTime.itemAngelta);
    	}
    
    }
    }
    }

    I still have the issue of being able to fly when I toss the item.

    Posted in: Modification Development
  • 0

    posted a message on Disabling Flight if Item is not in the inventory. **Solved**

    I changed the EventHandlerta to look like this, after reading some post on here, but it still doesn't disable flying.


    package taEventHandlers;
    
    import cpw.mods.fml.common.eventhandler.SubscribeEvent;
    import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.item.ItemStack;
    import net.minecraft.potion.Potion;
    import net.minecraft.potion.PotionEffect;
    import net.minecraft.world.World;
    import projectmayhem1983.wheeloftime.WheelOfTime;
    
    public class AngelEventHandler {
    
    	@SubscribeEvent
    	public void pTickEvent(PlayerTickEvent event) {
    		if (event.player != null) {
    			if (event.player instanceof EntityPlayer){
    				EntityPlayer player = ((EntityPlayer)event.player);
    				if(player.inventory.hasItem(WheelOfTime.itemAngelta) == false){
    					if(player.capabilities.allowFlying == true){
    						player.capabilities.allowFlying = false;
    					}
    					if(player.capabilities.isFlying == true){
    						player.capabilities.isFlying = false;
    					}
    				}
    			}
    		}
    	}
    
    }
    Posted in: Modification Development
  • 0

    posted a message on Disabling Flight if Item is not in the inventory. **Solved**

    Ok, I created an item that would let a player fly as long as they had it in their inventory. The coding is as follows:



    package projectmayhem1983.wheeloftime.item;

    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;
    import net.minecraft.world.World;

    public class ItemAngelta extends Item {

    public ItemAngelta() {
    this.setMaxStackSize(1);
    }

    public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) {
    player.capabilities.allowFlying = !player.capabilities.allowFlying;
    return item;
    }
    }



    Then, I tried to make an EventHandler class to check and see if the item is in the inventory, and if not, disable the flying. It looks like this:


    package taEventHandlers;

    import cpw.mods.fml.common.eventhandler.SubscribeEvent;
    import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.item.ItemStack;
    import net.minecraft.potion.Potion;
    import net.minecraft.potion.PotionEffect;
    import net.minecraft.world.World;
    import projectmayhem1983.wheeloftime.WheelOfTime;

    public class AngelEventHandler {

    @SubscribeEvent
    public void pTickEvent(PlayerTickEvent event) {
    if (event.player != null) {
    if (event.player.inventory.hasItem(WheelOfTime.itemAngelta)){
    }
    else
    event.player.capabilities.allowFlying = false;
    event.player.capabilities.isFlying = false;
    }
    }

    }



    The flying works correctly, once i give myself the item, I can fly. If i toss it on the ground, I can still fly. If I log out and back in, I can no longer fly.

    What do I need to change in order to disable flying once they lose the item?

    Posted in: Modification Development
  • 0

    posted a message on WIP - Wheel of Time [1.7.10]

    You can follow my mod here


    http://www.planetminecraft.com/mod/wheel-of-time/


    I dont feel like updating this, curse and planetmincraft

    Posted in: WIP Mods
  • 0

    posted a message on Where to start?

    Thanks Jcm2606, was just weird because the first item having the item superclass and extends item already in the code, where as the 2nd-4th items did not. Thought maybe I was doing something wrong, but as long as that is normal, I'll just roll with it. Did the item and block tutorials, tonight I'll do some more and hopefully later in a week or two, I'll have a functioning mod, so exciting!


    And thanks to everyone who has replied with these helpfully tutorials and books, it is all really great information :)

    Posted in: Modification Development
  • 0

    posted a message on Where to start?

    I just scraped it all, started over and used the names he did for everything and it all worked this time around. I guess when I first named my folder SS instead of ss, I might have screwed something up. Even though i went into explorer and renamed it to ss.


    So now I got texture working, but he is another issue I have. When we first make the ItemTable class, it automatically has the superclass Item from net.minecraft.item.Item

    Now, at the end of the tutorial he ask you to go ahead and make a total of 5 items. Each new item I have made, when I hover over it and then choose create class, it has the superclass that says something like java.lang.Object. Why did the first one auto-inherit the minecraft item superclass and the others dont? I have to copy and paste the import line from the ItemTable.java into the other 4 items java file. And I have to type in the extended Item part.

    Posted in: Modification Development
  • To post a comment, please .