Jump to content

TNT Blox 0

Members
  • Posts

    6
  • Joined

  • Last visited

TNT Blox 0's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Does anyone know how to do this? I want to have a custom container block that I can right-click on to open up an inventory like a chest, furnace, etc. I found this tutorial, but it doesn't work for 1.21. This page in the docs shows that opening a menu is way different, but it only has 2 parameters when the constructor in the tutorial needs 3, so I'm not sure what to do to get this to work in 1.21.
  2. I looked it up and apparently the annotation processor is supposed to convert everything, but for some reason, that isn't happening with my mod and I can't figure out why. The mixin docs are incomplete, so I couldn't find any information there and as usual, Google doesn't provide anything helpful. I honestly might have to just give up on using mixins for any version prior to 1.21.
  3. I'm trying to backport my mod from 1.21 to 1.20.1, so I made a new mod project for 1.20.1 and copied over my mixins after I set everything up . There weren't any errors, so I ran the client in Intellij and it worked just fine, but when I export it to a jar file and try to run it in a normal forge client outside of Intellij, it crashes on startup. This crash doesn't happen for 1.21. I've checked a thousand times to make sure everything in my gradle files are spelled correctly, everything has the right verion, etc. but I can't figure out what's wrong. The log (click for full file) says So I checked the sources with ctrl+H to make sure the function is still called that and it's right there with the same spelling, capitalization, etc. so I have no idea why it doesn't work. Edit: the refmap seems to not be generating and I don't know how to fix it
  4. I found another file called debug.log, but it doesn't have any errors either. https://pastebin.com/AEHPKz6a
  5. This is my ENTIRE log file. I didn't delete or change anything, I copy pasted it as is. https://pastebin.com/kd7ndEmG The game crashes immediately on startup, but the log doesn't give me a single error, warning, or anything. Earlier, it was giving me a graphics driver error, but I updated my computer and that fixed it, but now it's crashing without any errors at all. There's no errors in Intellij when I build it either. If I run the client in Intellij it runs just fine. If I disable my mod and run forge without any mods or with a different mod it also runs just fine. It even crashes if I comment out all my code, remove the 1 mixin in my project from the config file, and delete the data and assets folders. I made a new project and copied over my code, json files, etc. but it still crashes instantly, so I have no idea what's going on. The version of Minecraft I'm using is 1.20 and the forge version is 51.0.33. I checked to make sure these are the same numbers as what's in my gradle.properties file and they are. I made another mod with these exact same versions and it works. The only difference in the gradle.properties files is stuff like the mod name and description. The build.gradle files are identical except for the mod IDs. The mods.toml files are exactly the same. Neither mod has any dependencies I would have to install. I have no idea why one mod works and the other doesn't. Without any errors being printed to the log, I have no idea what to do to make my mod work. I spent days working on this and even more days trying to figure out why it won't work... Please help Edit: some files were named incorrectly in the build.gradle file that I overlooked.
  6. I'm using the newest version of forge for Minecraft 1.21, so this might be a bug, but I'm not sure if I'm just doing something wrong, because I'm kind of a noob. I'm trying to make a mod that (among other things) hurts entities when a minecart hits them. It works fine at first, but as soon as the entity dies the game crashes with a ticking entity error, but it's only for specific entities like pigs, but not villagers. I'm using a mixin to inject code into the canCollideWith function to do two things, 1. hurt the entity it collides with and 2. return false so the minecart doesn't stop. This is my code in AbstractMinecartMixin.java. package net.tnt_blox_0.improvements_overhaul.mixin; import net.minecraft.core.registries.Registries; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.damagesource.DamageTypes; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.vehicle.AbstractMinecart; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(AbstractMinecart.class) public class AbstractMinecartMixin { @Inject(method = "canCollideWith", at = @At("RETURN"), cancellable = true) public void canCollideWithInject(Entity p_38168_, CallbackInfoReturnable<Boolean> cir) { if (p_38168_ instanceof LivingEntity) { DamageSource damageSource = new DamageSource(((AbstractMinecart)(Object)this).level().registryAccess().registryOrThrow(Registries.DAMAGE_TYPE).getHolderOrThrow(DamageTypes.CRAMMING)); p_38168_.hurt(damageSource, 5F); } cir.setReturnValue(false); } } I know I should create a custom damage type, but I want this function to work first so I know the damage type isn't the problem. I've tried making one, but I get the same crash. Here's the log: https://pastebin.com/jDLvcMNC Here's the crash report: https://pastebin.com/EHLx47ZK Thanks!
×
×
  • Create New...

Important Information

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