Jump to content

Full armor set effect and double jump [1.6.2]?


Fruitsalid
 Share

Recommended Posts

It was

public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemstack)
{
	ItemStack boots = player.getCurrentItemOrArmor(1);
	ItemStack legs = player.getCurrentItemOrArmor(2);
	ItemStack chest = player.getCurrentItemOrArmor(3);
	ItemStack helmet = player.getCurrentItemOrArmor(4);

	if(boots != null && legs != null && chest != null && helmet != null)
	{
		if(boots.getItem() == ModClass.boots.itemID && legs.getItem() == ModClass.legs.itemID &&
				chest.getItem() == ModClass.chest.itemID && helmet.getItem() == ModClass.helmet.itemID)
		{
			//put the effect and stuff here
		}
	}
}

 

Now it gives an error that I can't have an int and item

Link to comment
Share on other sites

helmet.getItem() == ModClass.helmet.itemID

yeah... thsi makes no sens, this is literally the equivalent of comparing apples and hammers. To the eyes of the compiler this statement makes no sens.

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

Shouldn't you just get the itemID of the current worn boots, helmets etc and compare those with the itemID's of the armor id's which have the special effect? I have not tried to but i am not sure if theres a .getItemID for items. Otherwise you will have to find a different way to get the items ID. Perhaps you can even use boots.itemID.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello,   So I've been trying to setup Datagen for forge 1.19.3 in IntelliJ. All my files generate fine, but for some reason the game won't actually recognize any of the generated json files, yes they are named correctly. here is the log:  Also, for some reason the folder "generated" does not show up as "generated [main]" as I've seen in other tutorials and forks of open source mods. Could someone help point me in the right direction as to why? Thank you!    [13:29:33] [main/INFO] [minecraft/DataGenerator]: Recipes finished after 13 ms [13:29:33] [main/INFO] [minecraft/DataGenerator]: Starting provider: LootTables [13:29:33] [main/INFO] [minecraft/DataGenerator]: LootTables finished after 17 ms [13:29:33] [main/INFO] [minecraft/DataGenerator]: Starting provider: Block States: mystica [13:29:33] [main/INFO] [minecraft/DataGenerator]: Block States: mystica finished after 17 ms [13:29:33] [main/INFO] [minecraft/DataGenerator]: Starting provider: Item Models: mystica [13:29:33] [main/INFO] [minecraft/DataGenerator]: Item Models: mystica finished after 0 ms [13:29:33] [main/INFO] [minecraft/DataGenerator]: Starting provider: Languages: en_us [13:29:33] [main/INFO] [minecraft/DataGenerator]: Languages: en_us finished after 0 ms [13:29:33] [main/INFO] [minecraft/DataGenerator]: Starting provider: worldgen/configured_feature generator for mystica [13:29:33] [main/INFO] [minecraft/DataGenerator]: worldgen/configured_feature generator for mystica finished after 1 ms [13:29:33] [main/INFO] [minecraft/DataGenerator]: Starting provider: worldgen/placed_feature generator for mystica [13:29:33] [main/INFO] [minecraft/DataGenerator]: worldgen/placed_feature generator for mystica finished after 0 ms [13:29:33] [main/INFO] [minecraft/DataGenerator]: Starting provider: forge/biome_modifier generator for mystica [13:29:33] [main/INFO] [minecraft/DataGenerator]: forge/biome_modifier generator for mystica finished after 0 ms [13:29:33] [main/INFO] [minecraft/DataGenerator]: All providers took: 53 ms [13:29:33] [main/INFO] [minecraft/HashCache]: Caching: total files: 52, old count: 0, new count: 53, removed stale: 0, written: 52 Process finished with exit code 0  
    • tryign to run a server on a VM but I keep gettin this Error: Invalid or corrupt jarfile forge-1.19.2-43.2.0-server.jar
    • Ensure you have the latest version of Minecraft Forge and Java installed. Besides, make sure that other software on your system isn't conflicting with Minecraft Forge. But keep in mind that Windows 11 is a very new operating system. It may take some time for compatibility issues to be resolved by software developers. In the meantime, you may need to use a different operating system or wait for a compatible version of Minecraft Forge to be released. If I were you, I'd try installing windows 10 with a license activation key and enjoy playing.
    • I actually believe this is the issue too, but you see I have 300 mods and honestly searching through ALL that one by one, is gonna take forever is there any way I can identify the duplicate mods without needing to search one by one in the mods folder?
    • Well yeah, but it used to work and I definitely didn't change it. Where can I change it? Everytime I manually edit the pom-default.xml forge just overwrites it.   edit: oh my bad, i changed the folder name and its the reason the artifactId changed
  • Topics

×
×
  • Create New...

Important Information

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