Jump to content

Altemio

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Altemio's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. edit: ninja'd Many thanks for the response! I realised that was going on, hence putting the recipes in the loop block works (each pass sets the recipe when the item is created) but outside of it does not (because only one value is being passed out of the loop, the last). Guess I need more background, so to speak, rather than jumping in and hoping it will work (I'm surprised I got as far as I did). Probably tried doing something far too complex without the background for it. As for metadata, I'll be sure to look into that as it isn't something I've touched on yet. Thanks for the detailed response! Will have a look at your suggestions and see what I can do. Using an array/list and getItem is certainly something I'm going to have to research.
  2. Hello! The question is a little vague and might not be what I'm asking, as I'm not really sure as to what I'm actually asking. Sorry if this is the case! This is my first mod & first time with Java (no experience at all in any language, so I'm a lost lamb in this), so this might come across as a dumb/silly question, as I suspect it isn't something I can't get around the way I want to, but so far my oh-so-terrible google-fu hasn't really given me much in the way of answers. I'm generating items and ores from an enummap and running the enummap through a FOR loop. Everything works perfectly, and all the objects (items and ore) I wish to create are being created without any trouble. However, the issue I'm having is interfacing the results of these loops with each other, i.e. getting recipes to work. If I merge the FOR blocks together (such as nuggets and ignots), I can get recipes nugget<->ingot to generate as intended, but my issue is with getting different FOR loops to interact with those loops, if that makes sense. My nuggets and Ingots use the same enum map, so they could be put in the same block, however my chunks use a different map (my base enummap, which does not include alloy materials). This results in an issue where I am unable to have my chunks smelted into ingots / nuggets, as the only value I can catch is the very last to be calculated in the nugget / ingot FOR loops, i.e Zinc. I could probably overcome this by using the same enummap for my chunks as my nuggets/ingots (therefore generating alloy chunks, which I don't want) but the issue still persists because I need to pull my chunks out of that FOR loop and into another FOR loop in a different class, as I have ores being generated using the same method and I need them to drop my chunks. I'm starting to think I need to go back to the original method I was using, where I was using static assignments so I could reference the objects. I was just hoping by doing it this way I could centralise everything and make my code more compact and easier to modify. If there is a way around this that anyone is able and willing to share, that would be awesome! If the news is bad (and the way I'm doing it is just outright wrong/bad), then that is also good as I can drop this way of 'doing it'. Thanks in advance! I've removed all of my comments from the following code snippet (my entire class).
×
×
  • Create New...

Important Information

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