Everything posted by Animefan8888
-
[1.12.2] Unsure of how to create colour overlay for block.
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?
-
[1.14.3] Get loaded entites in world
Not an easy one. You'll just have to use the getEntitiesWithinAABB method for every loaded chunk.
-
[1.12.2] Unsure of how to create colour overlay for block.
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.
-
addScheduledTask
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.
-
[1.12.2] Unsure of how to create colour overlay for block.
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] }
-
[1.12.2] Unsure of how to create colour overlay for block.
You can definitely do that. Or you can do as diesieben said
-
[1.12.2] Unsure of how to create colour overlay for block.
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.
-
addScheduledTask
Well depending on what you are doing there might be a better way to run code on the next tick.
-
[1.12.2] Unsure of how to create colour overlay for block.
You need an instance of the interface. If you don't know what that means look it up on google. It's basic Java.
-
addScheduledTask
If you are using Minecraft#addScheduledTask yes. You probably want WorldServer#addScheduledTask
-
[1.12.2] Unsure of how to create colour overlay for block.
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.
-
[SOLVED] [1.12.2] NBT writing/reading for List
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.
-
[1.7.10] java.util.ConcurrentModificationException\Ticking error
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.
-
[SOLVED] [1.12.2] NBT writing/reading for List
You said you wanted to do it every time the command was ran. So do it then...
-
[SOLVED] [1.12.2] NBT writing/reading for List
Code always helps. Are you reading the entries from the file on server start up?
-
[1.14.4] How to get the file location of the current game
Oh well then a Capability would definitely work.
-
[1.14.4] How to get the file location of the current game
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()
-
[1.14.4] How to get the file location of the current game
If your data is World specific then you might want to use a Capability.
-
[1.14.4] Making a Trident like item
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.
-
[1.14.4] Making a Trident like item
Cool I did make the type-O. But... I'm not responsible for this.
-
[1.14.4] Making a Trident like item
No it would be null unless you initialized it. Post your getTag if statement.
-
[1.14.4] Making a Trident like item
Something on this line is null. Figure out what is null and make it so it's not null.
-
[1.14.4] Making a Trident like item
Somehow I was looking at my 1,12,2 sources ItemStack. apologizes. What was the error?
-
[SOLVED] [1.12.2] NBT writing/reading for List
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.
-
[1.14.4] Mining a 3x3/Making a Hammer
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()
IPS spam blocked by CleanTalk.