-
Posts
6157 -
Joined
-
Last visited
-
Days Won
59
Everything posted by Animefan8888
-
[1.12.2] Unsure of how to create colour overlay for block.
Animefan8888 replied to SeptemberBlue's topic in Modder Support
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? -
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.
Animefan8888 replied to SeptemberBlue's topic in Modder Support
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. -
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.
Animefan8888 replied to SeptemberBlue's topic in Modder Support
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.
Animefan8888 replied to SeptemberBlue's topic in Modder Support
You can definitely do that. Or you can do as diesieben said -
[1.12.2] Unsure of how to create colour overlay for block.
Animefan8888 replied to SeptemberBlue's topic in Modder Support
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. -
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.
Animefan8888 replied to SeptemberBlue's topic in Modder Support
You need an instance of the interface. If you don't know what that means look it up on google. It's basic Java. -
If you are using Minecraft#addScheduledTask yes. You probably want WorldServer#addScheduledTask
-
[1.12.2] Unsure of how to create colour overlay for block.
Animefan8888 replied to SeptemberBlue's topic in Modder Support
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
Animefan8888 replied to Differentiation's topic in Modder Support
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. -
[SOLVED] [1.12.2] NBT writing/reading for List
Animefan8888 replied to Differentiation's topic in Modder Support
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
Animefan8888 replied to Differentiation's topic in Modder Support
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
Animefan8888 replied to Elrol_Arrowsend's topic in Modder Support
Oh well then a Capability would definitely work. -
[1.14.4] How to get the file location of the current game
Animefan8888 replied to Elrol_Arrowsend's topic in Modder Support
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
Animefan8888 replied to Elrol_Arrowsend's topic in Modder Support
If your data is World specific then you might want to use a Capability. -
[1.14.4] Making a Trident like item
Animefan8888 replied to MineModder2000's topic in Modder Support
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
Animefan8888 replied to MineModder2000's topic in Modder Support
Cool I did make the type-O. But... I'm not responsible for this. -
[1.14.4] Making a Trident like item
Animefan8888 replied to MineModder2000's topic in Modder Support
No it would be null unless you initialized it. Post your getTag if statement. -
[1.14.4] Making a Trident like item
Animefan8888 replied to MineModder2000's topic in Modder Support
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
Animefan8888 replied to MineModder2000's topic in Modder Support
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
Animefan8888 replied to Differentiation's topic in Modder Support
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. -
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()