-
Posts
6157 -
Joined
-
Last visited
-
Days Won
59
Posts posted by Animefan8888
-
-
21 minutes ago, deerangle said:
I was trying to add a capability, but for some reason, the AttachCapabilitiesEvent isn't being fired (checked with breakpoints).
When did you expect it to fire? It fires when a TileEntity is created. And it definitely fires. Also are you wanting to attach it to every TileEntity in the game because if you only want it on your TileEntities that is not how you do it.
-
55 minutes ago, VaraHunter8 said:
IDk how to use my IDE
You should probably learn how.
52 minutes ago, VaraHunter8 said:ASM
ASM is not supported on this forum. Mainly because there are typically ways to do whatever you want with just the Event System and Reflection. What are you trying to do from an end user perspective.
-
16 minutes ago, Ekksvar said:
what do you mean by reflection?
Reflection is a Java feature we do not teach Java here, Google it.
-
1 minute ago, Jipthechip said:
I did that, and it just ended up never getting to the code I wanted it to.
Which means I was wrong about it being a World instance when you need it to be.
13 hours ago, Animefan8888 said:I'm not sure if this still works, but you might be able to cast the ILightReader to a World
-
1 minute ago, Jipthechip said:
but I tried casting it anyway just to see what would happen and it crashed. It gave the error:
13 hours ago, Animefan8888 said:(do an instanceof check
Also it can be null make sure it is not null before you use it.
-
2 hours ago, DrunkBlood said:
How do I disable features via my Mod Config the proper way?
I tried only registering them when my Config says but that had problems with ModConfigEvent firing late and other default values not being set.
Well you always register every registry entry. You then use the config settings to prevent or allow the attainment of the Item/Block/Enchantment.
-
6 hours ago, diesieben07 said:
No need for the cast, ILightReader extends IBlockReader, which has getTileEntity.
Ah ok I didn't get that from the name, and didn't check either. Either way they still have to check for null.
-
1
-
-
27 minutes ago, Jipthechip said:
My BlockState became too complicated for the values I wanted to feed into my IBlockColor#getColor() implementation.
Is there any alternative to getting values from the BlockState, or will I have to use a TER/TESR?
I'm not sure if this still works, but you might be able to cast the ILightReader to a World(do an instanceof check it can be null). Then if it is use World::getTileEntity and store your colors in the TileEntity.
-
1
-
-
6 minutes ago, xX_deadbush_Xx said:
Okay so if I want to draw over the players health bar do I need to do something like this?
Looks about right. However you don't need to use Object::equals to compare enums just use ==.
-
1
-
-
1 minute ago, xX_deadbush_Xx said:
I was thinking about just drawing something over the vanilla hearts... But I dont know ehere to even start something like that...
Use the RenderGameOverlayEvent.Post to draw on top of the screen. And RenderGameOverlayEvent.Pre to cancel specific parts of the HUD.
-
-
1 minute ago, Nallraen said:
minecraft 1.12.2
1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. For more information read the LTS at the top of the page.
-
Just now, aNoob4Gamer said:
Does this file exist within your jar?
Quotedefaultaddons:textures/items/ruby.png
Also its convention to do textures/item/texture.png nowadays.
-
Just now, aNoob4Gamer said:
Do you mean the latest.log because no debug log is created
No I meant debug.log, but normally latest.log works too.
-
Just now, aNoob4Gamer said:
Thank you that fixed the error issue, tho for some reason my textures now don't exist now.
Post the debug.log file found in .minecraft/logs.
-
Just now, aNoob4Gamer said:
Do I have to use the "build" task under that category?
Yes you either need to run the "gradlew build" task in the terminal or via your IDE to build your mod. Because Minecraft is obfuscated and therefore your code too must be obfuscated to match the Minecraft obfuscation.
-
7 minutes ago, aNoob4Gamer said:
When I run "runClient" in Intellij, minecraft doesn't give an error, but when I compile a jar for the mod and load it with forge it gives me this error:
"modid encountered an error during the load_registries event phase"
Here is the log file, hope someone can help.
Looks like you didn't build it using the gradle build task.
-
7 minutes ago, Novârch said:
FMLCommonSetupEvent
Show more of your code. Preferably as a git repo.
-
8 minutes ago, ketchup_god said:
World world = Minecraft.getInstance().world;
No. Minecraft is a client only class. Use the World inside the Entity.
-
22 minutes ago, Budschie said:
I need to access it, but I have no idea how...
Pass it in via the constructor. Probably instead of the ItemStackHandler.
-
4 minutes ago, mcDandy said:
what should set enumName to? Am I right with "FillerBlockType"?
Yes because that is the name of the Enum in the code. The second string is supposed to be "modid:somename"
-
1 minute ago, KidKoderMod033109 said:
Is this even possible?
Yes it is.
ServerWorld::getSaveHandler and then SaveHandler::getWorldDirectory
-
2 hours ago, mcDandy said:
Calling it directly is nonsense.
sorry. I am complete noob with this.You call it directly and store it in a public static final field.
-
3 hours ago, TheBigCraftGuy said:
entity.goalSelector.removeGoal(goal);
It should be goal.getGoal()
Also you cannot iterate and remove an entry. You will get a ConcurrentModificationException. Use an iterator.
Custom Mod Breaks Mobs in 1.15.2
in Modder Support
Posted
Yes you did in your y for loop in FindBlock.