Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Elyon

Members
  • Posts

    270
  • Joined

  • Last visited

Everything posted by Elyon

  1. I am naming a current mod project i (as in the imaginary unit), and figured the modid i would be fitting. Supplying a 1-character modid, and subsequently providing a vanilla name for a block (in my case, furnace ) crashes the game when loading with the following error: [Client thread/ERROR]: Caught an exception during block registration java.lang.IllegalArgumentException: The name i:furnace has been registered twice, for net.minecraft.block.BlockFurnace@d08edc5 and net.elyon.i.block.Furnace@257708e. Now, I understand we can't all have 1-character modids, and I have no issues giving the mod a more elaborate id ( imaginary , say). Furthermore, it would be simple to supply a different, non-clashing name for the block in question. However, I am curious as to the decision of disallowing 1-character modids combined with vanilla names - that is, if it is in fact a conscious decision in the first place. Mind; I do not request a solution to the crash, merely some insight into the possibly intenional dissallowance of the 1-character modid with vanilla names in the first place. If indeed this behaviour is not intentional, consider this a bug report instead
  2. Gee, I did not expect anyone to remember me here. I am flattered I had a look at the articles you have written (your site is not new to me, by the way), but alas, none of the troubleshooting steps provided a solution. I was, however, able to move the block registry to CommonProxy#preInit(), which rid me of one of the model definition errors - namely the item model definition error. I believe ISmartBlockModel (or at least the reference example using it) is a tad different than what your troubleshooting guide covers. At least, there seems to be no block model file, only an item model file and a (fairly empty) blockstates file, as is visible in the gist I linked in the original post. Should I have a block model file, despite the lack of one such file in the pull request provided example? If so, what would the meaningful contents of that file be, considering I will not be defining any custom models or textures (rather, I am reusing vanilla textures on a regular old cube). Edit: Solution Changing the proxies and the event handler to be more in line with the most current version of the example (as seen in the repository master) fixed the untextured block issue. This removed the need to have any model- or blockstate files, as well.
  3. I am trying to implement the example provided with Pull Request 1518. At this point, the block renders with the missing texture (image) texture. The item renders the redstone block patches only on the top face of the slime block, as well. Clearly I am doing something wrong. I have gone over the code a few times, but I cannot seem to spot any problems that would be causing this behaviour. The entire code is in this gist. Any recommendations (towards resolving the issue, or about the code in general) will be appreciated. Related question: The item renders normally in first-person, but in third-person the block is a full cubic metre in the player's hand. How would I go about fixing this? Follow-up question: Is there any way to silence the " [Client thread/ERROR]: Model definition for location two-science-life:pot#normal not found " console messages when using runtime-baked models?
  4. Okay, let's have a look, then! You need to @Override the getIcon method in your BlockCucumber class. Furthermore, there are several issues with your code: Remove the following for-now unused imports from itemsplusmod class: import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; import net.minecraft.item.ItemSeedFood; import net.minecraft.item.ItemSeeds; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; The convention is to name classes using TitleCase. Rename your main mod class. Your modid should be all lowercase Your packages should be all lowercase (specifically, com.itemsplusmod.Proxy, com.itemsplusmod.Plants and com.itemsplusmod.Items) You should add at least a preInit method, annotate it @EventHandler , and assign your static fields there. When you have performed all of these changes, here are some suggestions I recommend you to follow: Fix your indentiation: Correctness and consistency of indentation is important for reading your code correctly Keep MODID, NAME and VERSION as static final fields of your main mod class Reference your MODID when working with assets such as textures When posting code as gists, use syntax highlighting by selecting your language of choice (Java in this case) from the dropdown menu
  5. Indexed into an array at a place that didn't exist in the array. We don't know why you get that error, either. Post your code.
  6. Can you paste your entire class code? Preferably as a gist or similar
  7. Please don't follow Neale Gaming's tutorials. Their quality is sub-par, the content is often erroneous, and the code doesn't follow well-established conventions. Furthermore, the speaker's explanation of how things work are often misunderstood.
  8. Please use [ code ] tags. It's just spreading up because you're setting the block above with your j1 + 1 . Change that to just j1 . In fact, remove j1 altogether and just use y . Also, as has been pointed out, running 45000 iterations is a bit overkill.
  9. I have been working hard on making clientside chunk loading/rendering done, and I have made great progress. Now (and for the past two days), however, I am faced with the issue of only chunks with positive X and Z coordinates render. For some - to me inexplicable - reason, chunks with negative X or Z coordinates refuse to render. I have verified that the chunk data for all chunks is: Serialised properly by the server Sent by the server Received by the client Assembled by the client Filled into the correct chunks on the client Existing on the client at the time of rendering Yet the custom world chunks at (0, 0) and all other positive coordinates render flawlessly, while not a single custom world chunk at (0, -1) or any other negative coordinate combination render at all. I have dug through the entirety of the RenderGlobal and WorldRenderer classes, inserting conditional breakpoints and outputting various values, but nothing at all seems out of place in my renderGlobal instance compared to the default renderGlobal instance's way of handling things. These are the related parts of my EntityCamera class, and just in case it might be a problem with the chunk block injection, here is the ChunkResponse.Handler class, as well. Bear in mind I have verified that the data received is correct, and that all the chunks stay populated both pre- and postrender. EDIT: If you don't clip your renderers, it'll just clip with the last clipping used - in this case, that was along the X- and Z-axes.
  10. Look at what glass does, and duplicate that in a custom block.
  11. The last "S" is supposed to be 'S' .
  12. The chunk will be loaded on those two calls, yes.
  13. No, you're right, setBlockTextureName was a silly suggestion of me. My apologies.
  14. Tooltips serverside? Can you explain what you are trying to do, and what you expect to happen?
  15. I have a few projects coming up, but I'll add it to my todo-list.
  16. Good work. Have a look at LibNoise, though. I ported it to C# once, I might do it for Java as well in the future
  17. Sure, move the field and related methods to the TileEntity, and look into reading from/writing to NBT
  18. You can't store a boolean array in the Block class. In fact, the only way you can store data specific to a block in the world is to set its metadata, or use a TileEntity (which you are). As you have six directions of connections, and only 4 bits of metadata, the TileEntity is where you want to be storing the connections.
  19. Why do you insist on being generally unhelpful and arrogant? @ckazakeich, what Kriki98 should have told you is that the method is called setBlockTextureName .
  20. Did you follow any guides on setting up forge? Use ForgeGradle.
  21. That will still work. Did you use @Override instead of @SubscribeEvent ? If you're still having issues, showing your code and any errors you get is a good start
  22. If those were events, you would also have to register your class with the correct event handler. But they are not events, so you merely need to @Override the methods in your Block descendant. Enjoy
  23. You compute the direction in onBlockActivated , but you never write this data to metadata or the TileEntity.
  24. You can set whatever properties you wish - as fields - in a TileEntity. However, do you want to change the functionality of an existing block? If so, that'll require making a coremod, which can be a daunting task if you don't have a lot of experience with Java, programming in general, and at least a decent understanding of how Forge works.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.