Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. This is what you should do. There is no pre-existing method. You don't really know what a lambda expression is. Go read up on them seriously, they are greatly useful. Do you know how to call a method?
  2. Not an easy one. You'll just have to use the getEntitiesWithinAABB method for every loaded chunk.
  3. If it's in the TileEntity you have access to the IBlockAccess and the BlockPos. You can get the TileEntity and then access your field for the color.
  4. If I'm not mistaken I don't think you should use forceChunk as that is meant for persistent chunk loading. So if you were to just do something along the lines of Chunk chunk = World#getChunkAt(...); Which should load the chunk immediately. Then you can get the entity either from the chunk or from the world. Then move the Entity. And the chunk will unload just like that.
  5. Correct this is what a correct lambda expression looks like. // This way of going about it doesn't require you to use a "return" statement if the method in the interface returns a value. ([PARAMETER NAMES HERE]) -> [SOME CODE WITHIN A SINGLE LINE] // This way works exactly like you are inside a method. ([PARAMETER NAMES HERE]) -> { [MULTILINE CODE HERE] }
  6. Look it up. This is not a Java forum. Your IDE should be giving you a red underline right underneath that. Which is a clear clue that it is a Java issue.
  7. Well depending on what you are doing there might be a better way to run code on the next tick.
  8. You need an instance of the interface. If you don't know what that means look it up on google. It's basic Java.
  9. If you are using Minecraft#addScheduledTask yes. You probably want WorldServer#addScheduledTask
  10. Are you trying to call the method? That's not what you are supposed to do. You need to create an IBlockColor instance and register it.
  11. Post your code I can't help without it anymore than I already have. My suspicion is that you are just writing the new entry to the file instead of writing the whole thing again.
  12. All I can say is that make sure you are using their most up to date versions and if that doesn't work you may have to remove one of them. Also for future reference 1.7.10 is old and no longer supported here.
  13. You said you wanted to do it every time the command was ran. So do it then...
  14. Code always helps. Are you reading the entries from the file on server start up?
  15. Ok that's a little more troubling. Also sounds a little inconvenient for the user. What configurations are you proposing? Maybe you should just put them in the Forge specified configs. Maybe a little thought to be put into this. Anyways new File(".") will give you the working directory, so new File(./saves) will give you the saves directory in SinglePlayer. And the World's name would be in World#getWorldInfo()
  16. If your data is World specific then you might want to use a Capability.
  17. I told you how to do it in your Trident post. You need to override getSpawnPacket in your Entity class and return your own IPacket that spawns the Entity. The problem is the vanilla one doesn't handle modded entities unless they extend LivingEntity.
  18. Cool I did make the type-O. But... I'm not responsible for this.
  19. No it would be null unless you initialized it. Post your getTag if statement.
  20. Something on this line is null. Figure out what is null and make it so it's not null.
  21. Somehow I was looking at my 1,12,2 sources ItemStack. apologizes. What was the error?
  22. You'll either have to write all of the entries again. Or append to the file in some way. Look up FIle IO tutorials for Java.
  23. Take a deeper look. getEyePosition and getLook both take in a float called partialTicks. This variable is client side only. Of no use to use we are not a client. Use 0F. p_213324_4_ is a boolean. And if it used to determine if the FluidMode is ANY or NONE. You don't need this you can hardcode it to NONE. To figure out what p_213324_1_ is lets look at the call hierarchy of the func_213324_a. Upon looking at the first thing that comes up this is the block reach distance which you can get from the REACH_DISTANCE attribute. Like so PlayerEntity#getAttribute(PlayerEntity.REACH_DISTANCE).getValue()
×
×
  • Create New...

Important Information

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