Jump to content

[1.7.10]Help with this suggestion


theOriginalByte

Recommended Posts

Hey everyone!

I'm having a hard time trying to think of a way to implement this idea into my mod. Here is a picture:

wYoJS5kUbmEyiqC25AOh9kSaieaSIi.png

 

I know how to make the rods and figured out how to remove the recipes, its just trying to figure out how to make the tools vary in durability and power besides making a separate class for each tool.

All help is appreciated!

Link to comment
Share on other sites

Here is a picture:

 

That picture is text, you could have just pasted the text.

 

As for your idea: that sounds a lot like Tinkers Construct.  And if you don't know how to do it, you need to do other things and come back to this idea later.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Here is a picture:

 

That picture is text, you could have just pasted the text.

 

As for your idea: that sounds a lot like Tinkers Construct.  And if you don't know how to do it, you need to do other things and come back to this idea later.

Yeah but I would have had to fix the formatting... :P whatever..

 

It is a simplified idea of tinkers construct. Instead of having to smelt the blocks/ingots into liquid then casting, you would just mix and match materials with tool rods to get different types of mining speeds

 

Link to comment
Share on other sites

Here is a picture:

 

That picture is text, you could have just pasted the text.

 

As for your idea: that sounds a lot like Tinkers Construct.  And if you don't know how to do it, you need to do other things and come back to this idea later.

Yeah but I would have had to fix the formatting... :P whatever..

 

It is a simplified idea of tinkers construct. Instead of having to smelt the blocks/ingots into liquid then casting, you would just mix and match materials with tool rods to get different types of mining speeds. What do you mean do something else then come back to it later?

Link to comment
Share on other sites

It is a simplified idea of tinkers construct. Instead of having to smelt the blocks/ingots into liquid then casting, you would just mix and match materials with tool rods to get different types of mining speeds. What do you mean do something else then come back to it later?

 

Make another mod that does something else.  You're dealing with a rather complex problem with your idea and you should get the basics down first.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

It is a simplified idea of tinkers construct. Instead of having to smelt the blocks/ingots into liquid then casting, you would just mix and match materials with tool rods to get different types of mining speeds. What do you mean do something else then come back to it later?

 

Make another mod that does something else.  You're dealing with a rather complex problem with your idea and you should get the basics down first.

I have done basic mod work: (link to mod here: http://cyb3rwarri0r8.github.io/CommuMod/ )

Thats why i'm asking for help with this because its so complex that i'm not sure what to do.

Link to comment
Share on other sites

Use the renderpasses for icon of items to render your item. That way you can store in nbt data which rodtype you have, which type of toolhead. Then in the first renderpass you render the rod, in the second the toolhead and each following renderpass you add whatever you deem neccesary.

 

Diamond studded gold rodded emerald hoe sounds nice.

 

You can use the when in inventory method to check if its wielded and give certain buffs/debuffs that way. Stone rodded iron plated shield Sounds nice.

 

How much wood could a woodchuck chuck if a wood chuck could chuck wood - Guybrush Treepwood

 

I wrote my own mod ish... still a few bugs to fix. http://thaumcraft.duckdns.org/downloads/MagicCookies-1.0.6.4.jar

Link to comment
Share on other sites

Dude listen to the pro above. If you have no idea where to even start then you are not skilled enough to do this. Try something smaller and learn more. Don't get your drivers license and then immediately fly a cargo plane.

Yeah I don't have much of a clue on how to do what he said... Any idea of something smaller that would help me get to that skill level?

Link to comment
Share on other sites

Dude listen to the pro above. If you have no idea where to even start then you are not skilled enough to do this. Try something smaller and learn more. Don't get your drivers license and then immediately fly a cargo plane.

Yeah I don't have much of a clue on how to do what he said... Any idea of something smaller that would help me get to that skill level?

 

Why don't you try to work on re-creating vanilla items and then adding more to them. Such as a fishing rod with longer reach or something of the sort.

Link to comment
Share on other sites

Dude listen to the pro above. If you have no idea where to even start then you are not skilled enough to do this. Try something smaller and learn more. Don't get your drivers license and then immediately fly a cargo plane.

Yeah I don't have much of a clue on how to do what he said... Any idea of something smaller that would help me get to that skill level?

 

Why don't you try to work on re-creating vanilla items and then adding more to them. Such as a fishing rod with longer reach or something of the sort.

For instance, overriding the features of a vanilla item or removing it add making my own replacement?

Link to comment
Share on other sites

Oh, I have already dealt with this kind of problem. I have basically created a dynamic alloy system (The crafting class of the alloy tool checks the metals used in the crafting and adds all of the components' attributes, like durability, efficiency and all kinds of custom values), which is quite an analogy here, or I misunderstood everything; if that's the case, don't bother keeping to read, just give me an heads up on that.

 

Let me try to explain you how I've done it..

First of all I created a crafting class implementing IRecipe. I will skip IRecipe#matches, and get right to the one we need: IRecipe#getCraftingResult.

 

Here you can get the components used in the recipe (IRecipe#getCraftingResult has an InventoryCrafting argument, which is basically the crafting grid inventory). So, you check if one of the components is a diamond, you add 5 to a "durability" value, for example. That's just to give you the idea.

Then when you have checked through all of your components and rods, and adjusted your values, you return an ItemStack containing your custom tool (Don't forget Item#setMaxDamage(yourDurabilityValue) to set your tool's custom durability)

 

Hope I made that clear enough. To summarize things up:

 

You make a custom IRecipe class which will handle your custom tool's crafting. Use then IRecipe#getCraftingResult to grab all the components you need, and after checking them, add for example an int to a durability value. When you are done, return an itemstack containing your custom tool, with all the proper adjustments.

 

This is quite basic (that's how I see it), you just need to tell me what you don't understand, okay?

I try my best, so apologies if I said something obviously stupid!

Link to comment
Share on other sites

Oh, I have already dealt with this kind of problem. I have basically created a dynamic alloy system (The crafting class of the alloy tool checks the metals used in the crafting and adds all of the components' attributes, like durability, efficiency and all kinds of custom values), which is quite an analogy here, or I misunderstood everything; if that's the case, don't bother keeping to read, just give me an heads up on that.

 

Let me try to explain you how I've done it..

First of all I created a crafting class implementing IRecipe. I will skip IRecipe#matches, and get right to the one we need: IRecipe#getCraftingResult.

 

Here you can get the components used in the recipe (IRecipe#getCraftingResult has an InventoryCrafting argument, which is basically the crafting grid inventory). So, you check if one of the components is a diamond, you add 5 to a "durability" value, for example. That's just to give you the idea.

Then when you have checked through all of your components and rods, and adjusted your values, you return an ItemStack containing your custom tool (Don't forget Item#setMaxDamage(yourDurabilityValue) to set your tool's custom durability)

 

Hope I made that clear enough. To summarize things up:

 

You make a custom IRecipe class which will handle your custom tool's crafting. Use then IRecipe#getCraftingResult to grab all the components you need, and after checking them, add for example an int to a durability value. When you are done, return an itemstack containing your custom tool, with all the proper adjustments.

 

This is quite basic (that's how I see it), you just need to tell me what you don't understand, okay?

I think I understand what your saying... do you have a file to look at? I'm a visual learner so trying to take whats typed up and apply it is kind of hard for me.

Link to comment
Share on other sites

Mine is a bit more complex than this. Might aswell just produce some code right now, give me a few minutes..

Ok, sorry for the delay. Be advised, this is a bad written snippet of code, don't copy it, it's only a general idea..

 

 

 

@Override
	public ItemStack getCraftingResult(InventoryCrafting inventory) {
		//Default durability for iron tools
		int finalDurability = ToolMaterial.IRON.getMaxUses();

		//Loop through the first row of the crafting grid, as this is a pickaxe-shaped recipe
		for(int i = 0; i < 3; i++){
			ItemStack component = inventory.getStackInRowAndColumn(i, 0);

			if(component.getItem() == Items.diamond){
				finalDurability += 50;
			} else if(component.getItem() == MyCustomItem){
				finalDurability += someNumber;
			}
		}

		ItemStack result = new ItemStack(myResultPickaxe);
		result.getItem().setMaxDamage(finalDurability);

		return result;
	}

 

 

 

Sorry if you see something obviously stupid in there..

I try my best, so apologies if I said something obviously stupid!

Link to comment
Share on other sites

Mine is a bit more complex than this. Might aswell just produce some code right now, give me a few minutes..

Ok, sorry for the delay. Be advised, this is a bad written snippet of code, don't copy it, it's only a general idea..

 

 

 

@Override
	public ItemStack getCraftingResult(InventoryCrafting inventory) {
		//Default durability for iron tools
		int finalDurability = ToolMaterial.IRON.getMaxUses();

		//Loop through the first row of the crafting grid, as this is a pickaxe-shaped recipe
		for(int i = 0; i < 3; i++){
			ItemStack component = inventory.getStackInRowAndColumn(i, 0);

			if(component.getItem() == Items.diamond){
				finalDurability += 50;
			} else if(component.getItem() == MyCustomItem){
				finalDurability += someNumber;
			}
		}

		ItemStack result = new ItemStack(myResultPickaxe);
		result.getItem().setMaxDamage(finalDurability);

		return result;
	}

 

 

 

Sorry if you see something obviously stupid in there..

I gotcha! Thats awesome now I know where to go! thanks for the help!

Link to comment
Share on other sites

If you want I could pm you my skype account, as I don't have that thing you mentioned earlier. Just for chatting though, don't expect any calls to be answered. Pm me if you agree, let's stop bumping the thread here.

 

EDIT: Forget it, I just noticed that gitter is a part of Github, and I do have an account there, pm me for details.

I try my best, so apologies if I said something obviously stupid!

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.



×
×
  • Create New...

Important Information

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