Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Recommended Posts

i have an error in the sounds.js file idk know where it is and thats the error:

Caused by: net.minecraft.util.ResourceLocationException: Non [a-z0-9_.-] character in namespace of location: FirstMod:sounds.json

Link to post
Share on other sites
Posted (edited)
5 minutes ago, tnhrasv said:

Non [a-z0-9_.-] character in namespace of location: FirstMod:sounds.json

I would wager the error is more related to your modid having capital letters in it

And also, don't post single lines from a log, especially when you're a novice, the error isn't always where you think it is based on a single line of the log. Post the entire log, use a paste site like github gist or something. :)

Edited by Ugdhar
Link to post
Share on other sites

You should use github, and host your project on there, it makes it much easier to share your project with others. It's likely none of these files you posted here are relevant. If you dig through your project, you'll find FirstMod somewhere (besides a class name), I don't think the log would just change it to capitals if it were actually lowercase. Double check all your java files, and any jsons you may have created by hand.


Also, you still did not share the full log.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Hi! I was trying to create a smoke projectile, that when hits the ground spawn some particles for a certain duration. The problem is that, when the entity hits the ground, it don't spawn the particles at all. Here is my projectile: @OnlyIn(value = Dist.CLIENT, _interface = IRendersAsItem.class) public class SmokeBulletEntity extends DamagingProjectileEntity implements IRendersAsItem { private static final ItemStack STACK = new ItemStack(ModItems.BULLET.get()); private boolean activated; private int duration; public SmokeBulletEntity(World world) { super(ModEntities.SMOKE_BULLET.get(), world); this.activated = false; } @Override public ItemStack getItem() { return STACK; } @Override protected void onHitBlock(BlockRayTraceResult rayTraceResult) { if (this.activated) return; if (!this.level.isClientSide) { this.activate(); } super.onHitBlock(rayTraceResult); } @Override protected void onHitEntity(EntityRayTraceResult entityRayTraceResult) { //Must be Empty } private void activate() { this.activated = true; this.duration = 200; this.setDeltaMovement(0, 0, 0); this.xPower = 0; this.yPower = 0; this.zPower = 0; System.out.println("Active Smoke Projectile"); } @Override public void tick() { if (this.activated && !this.level.isClientSide) { //System.out.println(String.format("%f, %f, %f", this.getX(), this.getY(), this.getZ())); for (int i = 0; i < 100; i++) { this.level.addParticle(ParticleTypes.FLAME, this.getX(), this.getY() + i, this.getZ(), 0, 0, 0); } this.duration--; if (this.duration <= 0) { this.remove(); } } else { super.tick(); } } @Override public void addAdditionalSaveData(CompoundNBT nbt) { super.addAdditionalSaveData(nbt); nbt.putBoolean("activated", this.activated); nbt.putInt("duration", this.duration); } @Override public void readAdditionalSaveData(CompoundNBT nbt) { super.readAdditionalSaveData(nbt); if (nbt.contains("activated")) { this.activated = nbt.getBoolean("activated"); } if (nbt.contains("duration")) { this.duration = nbt.getInt("duration"); } } @Override public IPacket<?> getAddEntityPacket() { return NetworkHooks.getEntitySpawningPacket(this); } } Can somebody explain me why? Thanks!
    • Yes, this sounds good. However show your code once you've implemented this. You need an IServerWorld (do an instanceof check).
    • Really old Minecraft versions are no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  • Topics

  • Who's Online (See full list)

  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.