Jump to content

larsgerrits

Members
  • Posts

    3462
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by larsgerrits

  1. Maybe you could make it when the client needs the propertie, the server sends a packet to the client with that propertie, instead of synchronizing the all the time.
  2. Take a look at my source, i created a custom power system: https://github.com/Larsg310/PowerCraft/blob/master/src/main/java/larsg310/mods/powercraft/energy/EnergyNet.java In that class is a utility method for distributing enrgy to surrounding block/cables. It also uses my IEnergy interface that have some methods for connecting and distributing, and my EnergyBar class which actually holds the max power it can hold, the current power it holds and some method for manipulating the energy. P.S. If you see something wrong with my system, please say so so i can make it better.
  3. @knokko, Why do you pass in null in the Magic.get() method? You need to pass in a EntityPlayer object. (Hint: You got that as a parameter in the method)
  4. In the BlockEvent (the class that BreakEvent extends) is a EntityPlayer object which you can get the angles from.
  5. You probably mean the Magic.get method because the class is called Magic...
  6. The best way to find that method, is hitting CTRL+F, type in "tile." and hit search.
  7. There's no method called getBlockName in the Block class. The getUnlocalizedName method is there, but it may not be deobfuscated.
  8. Does anyone know of a mutex bit so that my AI is compatible with swimming, but not with wander?
  9. A call to .markDirty() makes Minecraft save the WorldSavedData.
  10. So how would then that go, X Y Z. isnt "Z" for UP and DOWN ?! da hell, was i looking at google pictures. if(world.getBlock(x, y, z) != Blocks.dirt || world.getBlock(x + 0, y + 0, z + 1) != Blocks.dirt || world.getBlock(x, y + 0, z + 1) != Blocks.dirt|| world.getBlock(x + 0, y, z) != Blocks.dirt) Like this then ?! In Minecraft, the coordinate system is weird. X is for east/west, Y is for up/down and Z is for north/south.
  11. @proalt That doesn't have anything to do with the error. @F1repl4ce Caused by: java.lang.NullPointerException at f1repl4ce.unlogic.entities.CustomPig.applyEntityAttributes(CustomPig.java:44) Can you post line 44 of CustomPig.java?
  12. getUnloclaizedName You switched 2 characters...
  13. I now about the prioroty system, but that doesn't have anything to do with this. About the mutex bits: How can i make it compatible with swimming, but not with wander? You don't specify it in the list.
  14. My entity extend EntityCreature, and this are the AI tasks: this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(1, new EntityAIRobotBuild(this)); this.tasks.addTask(2, new EntityAIWander(this, 1.0D)); this.tasks.addTask(3, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); this.tasks.addTask(4, new EntityAILookIdle(this)); The thing i want is that when the EntityAIRobotBuild is running, i don't want the EntityAIWander to execute, as that messes up the placement of the blocks. If you want to see more code, like EntityAIRobotBuild, you can use the link in the main post to go to my GitHub.
  15. You don't add the World as a parameter... You can get the world by using event.player.worldObj
  16. Hello, I added a new entity with some custom ai, and that works. But when my entity is using my custom ai, it is still going to walk away and screw up my custom AI. Does anyone know how to fix that? My code is here. If anyone needs more info, please ask, I'll be happy to provide that.
  17. You need to override the method public int getBlockColor() and public int getRenderColor(int) to return 16777215, so it won't get colored, but use your texture. (Don't ask me how you get this number, found it in Block.getBlockColor())
  18. FMLCommonHandler.instance().bus() is used for FML events, and MinecraftForge.EVENT_BUS for Forge events.
  19. Code would be usefull....
  20. I'll give up. I guess you don't want to follow the official Java Conventions...
  21. About 2: Here's a quoute from Wikipedia: So why areyou saying that isn't CamelCased? That is defenitly CamelCased. Please use those conventions!
  22. You are doing things client side, do those server side. Hint: Use world.isRemote , that will return true if it's client and false if it's server.
  23. WTF Does this code mean: Block.getBlockById(Block.getIdFromBlock(this) You are basicly getting a block from a id which you get from a block. You could've just used this instead of that chain of code....
  24. You need to have the LivingHurtEvent as the parameter, not as the method name.
×
×
  • Create New...

Important Information

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