Wuppy’s Minecraft Forge Modding Tutorials for 1.7: Eclipse Tricks: Importing

In this tutorial I will show you how to easily import new files you are using.

When you are writing some code using a not yet imported file you always have to hover your mouse over it to import it or manually write it in the import list. However, Eclipse has a useful shortcut to do this. When you press Ctrl, Shift, O Eclipse will automatically import all of the files you need and it will remove all of the unused imports.

In Minecraft there are some class names that have multiple import options. For example Block has about 5. When you import using this shortcut it will let you select which one you want to import. For most imports just select the Minecraft import which should be the correct one most of the time.

 

For a more detailed explanation and much more, check out my book Sams Teach Yourself Mod Development for Minecraft in 24 Hours.

STY Minecraft Mod Development Book

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">