Everything posted by Crescentine
-
Caused by: java.lang.IllegalStateException: Registry is already frozen
https://github.com/Crescentine/Trajans-Tanks-1.18 This is the repository I just created.
-
Caused by: java.lang.IllegalStateException: Registry is already frozen
Am working on my mod, attempting to update to 1.18.2; I am encountering an error I didn't have in 1.18.1: I am very confused My latest.log My crash report Main Class Thank you for taking the time to look at my problem. Any help given would be appreciated.
-
Entity Attributes not going through
If this is such a problem, what I don't understand is why it caused no problems before on older versions. something new on 1.18?
-
Entity Attributes not going through
So I remove the null check and that- would that mean the problem is fixed.
-
Entity Attributes not going through
https://pastebin.com/Giqcz8sx Yeah, here. A note: this is a tank mod, the "shoot" and other things aren't relevent to this because they work fine. The only reason tick is being overrided (overriden?) is because I need to make it so the time cooldown thing happns.
-
Entity Attributes not going through
Sorry, I thought originally this was a forge problem , so I made it for this. Anyway, I have THIS for the tick() method ... public void tick() { if (level.getServer() != null) { super.tick(); } One of my friends told me I needed to check if it was NOT null before the super because otherwise, it was crashing when the entity was spawed- if that's not the solution , then what do i do to stop it from crashing? Here is a pastebin of that crash. Thanks by the way for trying to help me. https://pastebin.com/Qk37BRA6
-
Entity Attributes not going through
Basically, my attributes for my TankEntity are not going through. I'm DIRECTLY porting from 1.17, and it worked fine on 1.17 and 16, so I'm pretty confused here. The Entity extends Pig and within it, this is for creating the attributes. public static AttributeSupplier.Builder createAttributes() { return Pig.createLivingAttributes() .add(Attributes.MAX_HEALTH, 90.0D) .add(Attributes.MOVEMENT_SPEED, 0.14f) .add(Attributes.KNOCKBACK_RESISTANCE, 10.0D) .add(Attributes.FOLLOW_RANGE, 0.0D); } Then, in my EntityTypes Registry, I add the attributes. @Mod.EventBusSubscriber(modid = TankMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) public class TankModEntityTypes { ..... @SubscribeEvent public static void entityAttributesInit(EntityAttributeCreationEvent event) { event.put(TANK_ENTITY_TYPE.get(), TankEntity.createAttributes().build()); } I just don't understand why its not working. This worked fine , before. The Entity spawns, but it weirdly just floats in the air, and when hit it goes red and doesn't stop being red. When the player rides it, its health also doesn't go down. Really strange stuff. I looked at some other mods which have entity attributes, and it works fine in them. If there's anything else I need to show let me know.