title: Minecraft 2d Remake: Building and Destroying Blocks Issue
body: <p>I am well into creating my 2d remake of minecraft in java.  I know it can be done well, orange451 on youtube inspired me to try and make this.  I have all blocks on the map loading from text files, and when the game loads, it adds all of the blocks from the text files to an ArrayList.  I created an algorithm for calculating the index of the block your cursor is on in the game, and added a MouseListener so that when i clicked it would replace the block with an air block (basically destroying the block).  To replace the block in the ArrayList, I used the ArrayList set(index, obj) method.  In theory, it should be working correctly, and it in a way does.  The only problem is that it also creates a black space in the map a few blocks away.  This is extremly frustrating, especially since I have come so far.  ADDITIONAL INFO:  I need a method that will replace the object in the ArrayList, or a better way to do it because my collision detection method also uses the ArrayList to detect a blocks position.  PLEASE HELP ME!  I cant post images but its setting the block to the air texture but creating a black square (a gap in the arraylist mabey?) near it.  Because theres too much code to post, heres the source code for the whole project:  <a href="http://www.mediafire.com/?1bl4t347a8ta8a4" rel="nofollow" title="http://www.mediafire.com/?1bl4t347a8ta8a4">Blockworld 2D Source</a></p>