Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/23/17 in all areas

  1. This is the tutorial I followed by the man himself. It is old, but still works as the general concepts are the same. I don't think you have to create the debug configurations anymore, as they were already there for me for 1.11. I did have to remove the VM arguments in order for it to work though. Also you shouldn't have to change anything in the build.gradle file except for Hope this helps. https://www.youtube.com/watch?v=xp2jmt47yTQ
    2 points
  2. Yous set one of the textures to an empty String. I'm not certain, but since the error is a StringIndexOutOfBoundsException at index 0, it seems likely that an empty String is the problem.
    1 point
  3. An iterator works fine if you use the iterator's add and remove methods (iterator.add). I discovered that after running into the ConcurrentModificationException and doing some more research. There's another problem, however, because the iterator's cursor is always in between elements in the collection. When you add a new object to the collection, it gets placed behind the cursor. I have to keep track of how many things I've added and move the iterator back to look at them. I'm thinking I'll switch back to a queue at this point. The only reason I wanted to try the ArrayList in the first place was to see if it was somehow more accurate with detecting duplicates in the collection. I've tried using a LinkedList, an ArrayList, and now a hash set to hold the blocks I've already looked at. In each case, I just used the collection's #contains method to see if the BlockPos is already in the list. Looks like the same thing you're doing here: if (!checked.contains(toAdd)) My code is currently part of a private BitBucket repository. I didn't want it to be public at first, because I was embarrassed. I was going to post some of my code here , but it looks like it isn't possible to do spoilers or code blocks in topic replies. Unless I'm missing something? Come to think of it, how do you do that monospace font in replies? All I see are bold, italic, and underline. By the way, I loved your idea of using a list of BlockPos offsets and iterating through that to scan for log blocks. I tried that in my code, and it's so much cleaner than what I was doing before, which was basically a giant block of code with a million BlockPos.up().north().east() references and the like.
    1 point
  4. Actually flesh out your ideas beyond 'I think thing should go here!' Give reasons, examples of what you're trying to accomplish, let others try and help you achieve it in the way that we already have. In most cases you can do everything you want without any extra hooks anywhere. And if you CANT then people can discuss how best to go about the hooks. So, Moved to Modder Support NOT suggestions, you need to flesh things out.
    1 point
×
×
  • Create New...

Important Information

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