Jump to content

firstdwarf

Members
  • Posts

    31
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Oklahoma, U.S.
  • Personal Text
    I try

firstdwarf's Achievements

Tree Puncher

Tree Puncher (2/8)

3

Reputation

  1. It defaults to 127.0.0.1, of course, but I tried using local host and the communication error still causes a problem.
  2. It starts, both programs run perfectly, but on the server list, it doesn't even poll; it says communication error. As I said above, and especially after testing, the problem is that eclipse is disallowing access between my programs or something of the sort. Every line of code I have works perfectly, as my tests using minecraft and an external server show.
  3. If you post your code, particularly the lines specified in the log, we may be able to help more.
  4. The final vanilla ID is 173, for a block of coal. You CAN use any block ID higher than that but before 256, but it may cause conflicts with other mods. Remember, most blocks don't need to be that low! My best idea would be to make only the blocks in the biome that low, and then make sure that you have a config file for those blocks to pick any one of the exceedingly limited number of slots that might be available. On reading up a bit: since biome blocks are stored as bytes, they absolutely must have IDs under 256. Otherwise, they begin to count negative and the kinds of problems you are having start to show up. In summary: Pick an ID between 173 and 256 and make sure it's configurable to resolve conflicts with other mods. Hope that helps!
  5. Are you keeping the block IDs low? I've never had a problem myself, but I've heard that anything over the low 200's or so can cause problems due to being converted to bytes and whatnot.
  6. So I use the MCP test server to check every new addition for SMP compatibility. However, after one such addition, the MCP server can't be found. There are no errors for the client or server consoles; it just says communication error on my servers list. After undoing my change, it still didn't fix, and even deleting the relevant methods and class completely didn't change it. After recent problems with eclipse resetting the build path, I'm a bit wary. Is there some reason eclipse would prevent the MCP test server from working? Turning off the system changes nothing. FYI, I'm about 99 percent certain that my code isn't the problem; as I said deleting the entire method (without breaking the code, of course) doesn't help. Throughout this whole thing single player works perfectly and, as I said, there are no error logs or console warnings (that I can find at least). I'm afraid I triggered eclipse to do something behind the scenes without telling me again. Any ideas would be welcome! EDIT: I zipped and tested the mod on an actual minecraft server, and while the feature I was trying to fix doesn't work (of course not; I deleted my fix to try to restore the MCP server), the server itself works perfectly. Therefore, it is some sort of eclipse error and not in my coding.
  7. Problem Solved! Turns out only the very first solution that I tried didn't work… all the others worked perfectly. What actually happened is that Eclipse somehow changed its build path and saved the copy of the code that didn't work… I only noticed the problem when I removed some print streams and it didn't stop printing. In summary, Eclipse error like a noob...
  8. The sound and animation still aren't canceled and I haven't been able to find out where they are called. Checking more code to see exactly what makes creative mode the way it is; everything I've found in the player settings hasn't helped it.
  9. I remember why I counted this one out. I only cancel the damage when the player is blocking and looking at the entity firing the projectile. Getting the target entity is simple. However, the reason I use LivingHurtEvent is because I can trace the entity that caused the damage. If it's an instance of EntityArrow, I can check the entity that shot it and compare that to the target entity. However, if I use LivingAttackEvent, I only have access to the player, where I can still find the target entity, and the damage source, which I'm not sure is linked to an instance of an entity. However, if there's a way to get the attacking entity from that, I would love to hear it!
  10. Yeah, I cancel the damage through LivingHurtEvent. I was focusing on canceling the damage and never thought of canceling the attack in the first place. I'll give it a shot; thanks.
  11. So I've done a lot of research and read through the Entity.java, EntityLivingBase.java, EntityArrow.java, and all various forge events but I can't seem to find a way to do this. I have a situation where I'm canceling the damage from an arrow in a certain case, which is easy. However, despite coming up with multiple methods to simply cancel the damage and knockback, the animation and sound remain. The disableDamage player capability doesn't work. The invulnerable boolean doesn't work, is protected, and appears to only set disableDamage anyway. I tried canceling the sound if the entity in question was the shooting entity, the instance of the arrow, or the player itself but it had no affect; upon too much inspection, the trail of methods led me all the way to a place where the specific sounds I want to cancel don't use forge events to work. Does anyone know how to go about this? I must be missing something. Also, turning the player completely invulnerable, i.e. creative, isn't an option unless someone knows how to add extra commands post event. I found a post method in event_bus but I have no idea how to work it. Any help would be very much appreciated!
  12. Shears appear to function by checking if the entity you have right clicked is shearable and, if so, performing the necessary functions. All you have to do is find a way to get what entity is standing on your block. Check out the onEntityWalking method. The final parameter is the entity, which you can then manipulate the same way shears do. Good luck!
  13. The server source error should be normal; I think it always spits that error out. Other than that, I guess just troubleshoot. Make sure that the version of forge your mod is created in is the same version on your server. I would also recommend having no other mods on that server just in case there's a conflict and that's the cause of the issue.
  14. Just a few things that might need to be fixed: First of all, in the version of forge you are using, every single thing beginning with GameRegistry must be placed in the method @EventHandler public void preInit(FMLPreInitializationEvent event) { } Furthermore, I'm not sure you're registering your blocks. Unless // is something I don't know in Java, which is entirely possible, the code should be GameRegistry.registerBlock(unlocalizedName, "unlocalizedName") FYI, usually, internal names aren't "Capital Capital" but camelCase; i.e., no spaces with the first word uncapitalized. Classes are CapitalCase and there are rarely spaces between both class names and internal names. Next, all your constructors should be placed in preInit as well. Right now you have them in load, but load appears to be completely empty; make sure that everything is put here: @EventHandler public void preInit(FMLPreInitializationEvent event) { (Your Code Here) } In summary, register your blocks and items, place all the constructors public static Block SomoniomBlock = new BlockSomoniomBlock(2004, Material.iron).setUnlocalizedName("Somoniom Block"); in preInit, and I think that your language registry and game registry additions need to be there too. If not, you can move the language registry stuff back INSIDE the load method, and if that still doesn't work, place the game registry stuff there too. Check out some tutorials for the most recent version of forge; those tutorials know more than both of us.
  15. Your ore may actually be spawning above 45… I could be wrong, but I'm fairly sure that this line int randPosY = 45 + random.nextInt(5); means that your random position Y will always be 45 plus a random number from 0 to 5; basically only 45, 46, 47, 48, 49, or 50. Whatever you wish your ore to spawn above (for example, 1 or 6) and what you wish the ceiling to be (45 I guess) should be used like so: int randPosY = yourMinimumHeight + random.nextInt(yourMaximumHeight - yourMinimumHeight); But don't just take my word for it; I could be wrong. Test it with print streams! After (new WorldGenMinable(ItemList.sorrowfulore.blockID, 9)).generate(world, random,randPosX, randPosY, randPosZ); try to insert this command: System.out.println("(" + randPosX + ", " + randPosY + ", " + randPosZ + ")"); This will print out the exact coordinates of your ore upon spawn. Simply check your console for the spawn location and hunt it down! Good luck!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.