
Sync Views
Members-
Posts
37 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
Sync Views's Achievements

Tree Puncher (2/8)
2
Reputation
-
Use a debugger and put a break point on getServerGuiElement and getClientGuiElement. That will tell you exactly whats going on. e.g. confirm that both client AND server are creating there part of the GUI, and that the right thing is created each side. Also a literal value in a switch is almost always the wrong thing to do, as with a literal true/false in an if statement. The entire construct serves no purpose.
-
Maybe make a dedicated recyling station or something. Then you could make the recipes for it work how you want.
-
[1.6.4] Making Mob Give off Redstone Signal?
Sync Views replied to saxon564's topic in Modder Support
Why not look at the existing blocks that interact with redstone (wire, torch, door, etc.). IIRC there are some methods in World that look around for blocks providing a signal via isProvidingWeakPower and isProvidingStrongPower. Pretty sure there is nothing in there to check for entities, so I think you would need to put a core mod in those world methods to look for your entity (seems like a performance issue, maybe come up with a better way), then mark the blocks for update as your entity moves around so they recheck their redstone status. -
[1.7.2] Make player "bounce" when they touch block?
Sync Views replied to Eternaldoom's topic in Modder Support
Or better yet, always use @Override when overriding any method, Minecraft or not. As well as telling you if you did the overload wrong (mispelt name, incorrect parameters etc.) it will help you if the base class/interface changes in an update. -
Creating an EntityFallingBlock in the world with TileEntity data?
Sync Views replied to skyress3000's topic in Modder Support
Be careful that if you read the NBT saved by one TileEntity into a different TileEntity you will change the position of it (TileEntity.writeToNBT and readFromNBT includes the xCoord,yCoord,zCoord), which will likely break things, so be sure to fix those coords once readFromNBT is complete, or have a custom read function entirely, or update the NBT with correct coords before read, etc. -
You really find command prompt easier than making use of the IDE's debugging, auto-completion and search capabilities? Sure for small projects, but I find that hard to believe when you have 100,000+ lines of code to deal with... You still have all the gradle stuff you can use from the command line (I think it has a separate target to recompile and to reobsucate giving you a deobsucated set of class files to test with if you really want to go the command line debugging route).
-
Can you go lookup what 64bit means then? It has zero todo with dimensions like that... As for the sand problem. Why don't you try looking at the code for things like that? In short for certain blocks the texture name is ignored for whatever reason, so you would need a core mod for all those cases to load something differently immediately, or at least reflection to overwrite some private fields later. Not sure what you mean by biome colours. If you mean like grass and leaves being recoloured based on biome, again look through the code. Its either a method on the block or part of the renderer if they have a different render type to normal blocks that provides a multiplier. If you want to change that you might be able to set something in the biomes to get the colour you want, otherwise again you need to modify how that code path works.
-
diesieben07's and other similar methods is the only way I know of if you have source dependencies where you want to import any type from the other mod, rather than just use a basic Block returned by GameRegistry or such. If that "do your stuff" depends on anything from the other mod, then you will get a NoClassDefFoundError as soon as Java tries to load your classes because it tries to fully resolve everything as soon as the class files are loaded, not waiting until the first reference is actually executed (the contents of your if statement). Just make a central class (ideally in its own package to keep things separate, say mymodpackage.othermod.Extension implementing an interface mymodpackage.IExtension) for the extension. And make sure that nothing else in your mod ever imports one of the classes from that package (likely to give you a NoClassDefFound if the other mod isn't present). If you detect the mod is present (be careful of load order, e.g. I think its possible for Loader.isModLoaded to return false for a mod that is present if you call it too early, possible preinit and certainly any static initialisers) then use "(IExtension)Class.forName("mymodpackage.othermod.Extension").newInstance()" to get an instance of that class without it ever being imported (Java will only attempt to load those class files at this point, avoiding the NoClassDefFound if the other mod is not present). You could also thus do a try/catch around the Class.forName(...).netInstancerather than check Loader.isModLoaded.
-
Ive seen some mods with API's that provide access to their blocks etc. by reference, and dont require the full mod the be present. You could do something similar and would make it easier for anyone else that depends on your mod to deal with such things. Potential problem with this though. Say your mod is installed and the player has some of your items/blocks. Then installs some other mod without completely restarting their world. They will now be unable to correctly load that world because you essentially uninstalled content that the world already depended on. This might be alright if your mod significantly effects terrain generation, but even for just say some new ores (and especially if your mod or another already had a compatible ore) they may want to keep their world.
-
64bit? 65bit? Most textures in any game Ive come across recently are 24bit RGB or 32bit RGBA, so really not sure what you mean there. Also if you use a resource pack or put the textures in the jar, you still have to update them if MC changes something relevant (e.g. new blocks or reworks the texture system again). The only potential advantage I see of putting a texture pack in a mods jar would be to make it enabled by default, but there is possibly other ways to do that as well. Also using a different base graphics set creates a compatibility issue with basically every other mod.
-
Think the Item ItemBlock and Block just use the Object version of equals which uses identity. Although I guess a mod might try to override it for their own types. Eclipse shows the referenced jars at the bottom of the package manager. You can see the classes and if available their sources there. Everything else, goto declaration, find references, etc works largely the same as for your own code in the project.
-
A very quick look in my IDE showed my World.computeLightValue, which when computing for sky lighting immediately checks canBlockSeeTheSky... So if you actually want your block to behave like sky (so essentially light an infinite distance downwards through air) id mod that function to call a custom canBlockSeeTheSky type function that also returns true if when searching upwards it finds your block.
-
Sun light doesnt exceed 15. It just all cells with direct view of the sky get this 15 value if i recsll correctly. If this is what you want you could find where in the lighting code this happens you can maybe make your block count as the sky. Pretty sure will need to be a core mod todo that.
-
Well if the mod has compatibility with it its likely fine. e.g. I had some shortcomings i their API, so my stuff can interact with the major existing power nets, with some limitations, but if stuff from my mod is directly connected, it acts as a power and data channel (e.g. I integrated power demand and distribution, in a far simpler way for the player than trying to have say on demand buildcraft power using gates as long as all the generators and consumers are either capable, or at least have suitable estimated values)
-
I am looking into making some large multiblock machines and storage, like say many of the machines and the iron tank from Railcraft. My idea is to have one main TileEntity that deals with all the logic, and I can make code when a block is placed or destroyed to see if the structure is complete. For smaller structures I could also encode the blocks relative position in the meta data (so can get the centre block / main TileEntity quickly without having to do a search). For larger structures I am not entirely sure. The problem though is in order for things like hoppers, Buildcraft pipes, etc. to work, I need a fully functional IInventory etc. TileEntity for each of the blocks that these things need to interact with. I can make the "proxy" TileEntity reference the main one, but what do I do if it is a chunk border and the main entity isn't loaded? I looked at TileEntityChest, but from what I can tell it relies on other entities like the hopper giving it special treatment. Also while the examples I can think of are from closed source mods, is there a standard way to do this? Perhaps an open source example?