-
How to tell item listing mods such as NEI to ignore certain blocks?
Use the mod's API. Specifically for NEI, use its API: https://bitbucket.org/ChickenBones/notenoughitems/src/8986f98aef1e38bc09f9ea5c5ebed4af6aa05d27/codechicken/nei/api/?at=default You want to use API#hideItem(int id)
-
[1.7.2] - No damage when spawning lightning
You have to spawn lightning on server and client. On the server because the damage, and the client to have the rendering So, you just have to remove: if(!world.isRemote) { return itemstack }
-
[1.7.2]NetworkRegistry
.... THAT IS NOT A CONSTRUCTOR!
-
[1.7.2]NetworkRegistry
Look at the bold. <init> is the constructor. Please go back to learning Java and stop "copy & paste modding." YOU CANNOT DO SHIT IN THE CONSTRUCTOR OF YOUR MAIN MOD FILE. Oh, and Pahimar is definitely not doing all this in the constructor, you are just blind. Have a read: http://www.homeandlearn.co.uk/java/write_your_own_java_classes.html
-
NBT Simulation
At this point the system is almost complete to have 'External NBT data.' I just need to optimize my code and then Im ready for a build! Thanks again Draco & Diesieben!
-
[1.7.2]Get icon file name on server
You can get it via reflection, and dont edit the minecraft source
-
NBT Simulation
As I mentioned in the initial post, I am writing a framework for ComputerCraft. It basically is just passing around interfaces and some annotations and wrap around those to hook into the API of ComputerCraft. To make a long story short: ComputerCraft then uses these hooks when a block is next to the computer and checks if its an TileEntity. Then it calls the API for help so-to-say and gets my hook. In fact, that system is done and the bugfixing is mostly done. I am also writing a mod at the same time which is based on that framework. While writing that I discovered that having NBT data access is really handy. So I decided to try and get a system around that basically does the same as normal NBT, but not on the actual TileEntity, because that is just asking for issues. In order to pass around those NBT data I was wondering how MC did it, and based on that I would write my own. Meanwhile I figured I should use the MinecraftForge events: net.minecraftforge.event.world.ChunkEvent(.load & .unload) because it makes it more easy for me to find those TileEntity's and pass them to my interfaces. I think I can manage to do it, especially since Draco18s just posted an example code: So, thank you for both of your time! If Im getting issues while writing that system, I will post them to this relevant post. If not, I will lock this topic on my own. Thanks again You guys helped me out!
-
NBT Simulation
Yeah I know NBT is a data format, I guess I didnt formulate it properly. Since I posted this topic, I ironically found the class you mentioned. It definitely will help, but since Im getting into creating my own NBT file (I guess that is the proper way to formulate it), I also want to see what calls TileEntity.readFromNBT & TileEntity.writeToNBT. That way I can see how minecraft does it, and maybe I can add my own twist to that (though I doubt that, why wouldnt the mc class wouldnt perfect for it? I will see what Im going to do with it). So, thanks Diesieben for the quick help already! My other question, which is the final question in this topic for me, is: from what classes are TileEntity.readFromNBT & TileEntity.writeToNBT getting called? If I know that, then I can do it, since I can look up the imports and such etc. Thank you in advance for the help (again ) - EducationalPurposes
-
NBT Simulation
Hello community, I am currently making a framework for the mod called "ComputerCraft." You dont have to know what it is to answer my question, since it is NBT related. So, I know how I can use NBT with the TileEntity's. That is not the issue at all, I am more interested in how the NBT gets saved. I couldnt find the source code to the classes/package(s) which actually save the NBT. Im interested in that, because I need to simulate the NBT without a TileEntity, and to do that I need the code on how to save the NBT. I am going to make my own file of course and probably remake that system to not really get copyright shizzle So, where can I find that code? Thank you in advance, - EducationalPurposes
-
[1.7.2] setBlockHarvestLevel and setToolClass? [#1022]
Apparently you have to override it in your block class: https://github.com/MinecraftForge/MinecraftForge/blob/master/src/main/java/net/minecraftforge/common/ForgeHooks.java Line 99 -> method canToolHarvestBlock(Block block, int metadata, ItemStack stack) You can see that block#getHarvestTool(metadata) & block.getHarvestLevel(metadata) are getting called. From that I can conclude you have to override it As for setting a custom tool class, I couldnt find it as quickly as this. (I spent 5 minutes )
-
[1.6.4] slabs
That really is the most important thing of mc modding.. not just the registering part. Enough tutorials: http://bit.ly/1bQy70T Look at the vanilla classes, you can figure it out. Btw, we are not google, sounds rough, but do your frikkin research
-
[1.6.4] Java 6 or 7?
That is the exact same deal with people who dont want to upgrade their consoles (xbox360, px3 etc.). In my close environment they are complaining that they now only going to make games on the next gen consoles. It's like, why don't we compare squirrel with an elephant? Its pointless, most of the time you should use the latest versions on anything. Though there exceptions.
-
Proxy Class not Found
You might want to refresh your workspace, especially when using eclipse. Eclipse is awfull with updating files around, so try to refresh it. You refresh it like so: 1. select your project and hit F5 2. relaunch Eclipse
-
Custom Mob that Picks up Blocks like Endermen [Solved]
It is in the rendering of the enderman, not the model!
-
[1.6.4] Custom GUI not Opening.
You want to open the gui on both server and client. I know it sounds strange, but it is for the container and all. Your code only opens the container of the GUI [spoiler=so, this code] public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ){ if(!world.isRemote){ FMLNetworkHandler.openGui(player, AntiOres.instance, Ids.guiIdAntiFurnace, world, x, y, z); } return true; } Dont check for a side: @Override public boolean onBlockActivated(World, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { player.openGui(AntiOres.instance, Ids.guiIdAntiFurnace, world, x, y, z) //Same as: FMLNetworkHandler.openGui(player, AntiOres.instance, Ids.guiIdAntiFurnace, world, x, y, z); though one less import return true; }
IPS spam blocked by CleanTalk.