Topic category: User side tutorials
This is very specific and roundabout way to do this, so this might not work for everybody.
This tutorial will teach you how to create a mob that gives off light. This method spawns a no-collisions block at the location of the mob and deletes it when they walk away. You will need to follow these steps in this order!
Step One: Create a light block.
-Create a 16x16 image that is completely empty so that it appears invisible ingame.
-Create a new 'Block' mod element.
-It is important that you have transparency checked, as well as edit the block bounding box coords. You want this box to be as small as possible so people don't accidentally hit if trying to attack your mob.
-Next, you'll want to make sure the material is Air, and that it has no creative tab entry. It's Hardness and Resistance should be 0. Luminance can be defined however bright you'd like your light to be.
-Make sure you can walk through the block, and that the custom drop and creative pick item are air, just in case somebody does actually manage to break it, it wont give them anything.
-The block needs to be replaceable just incase somebody is building in the area, we want people to not even think that the block exists.
-The rest of the settings are up to you!
Step Two: Create Your Mob
-Create your mob. I've used a custom model and custom textures, but you can use whatever you like. I think you should try using the glow texture just to make the parts that you want the light to be coming from to glow a little.
-Everything about the mob is up to you, but I recommend making it slower to make the illusion work a little better.
Step Three: Create Your Procedure
-Within your mobs settings, create a procedure under the "On Entity Tick Update."
-We are essentially going to place a block at the mob's head (Y + 1) and delete any instances of the block that are next to it.
-The first if statement checks if Y + 1 has Air or Cave Air, and then places one of our light blocks at the same location. (Every empty slot is the light block, and every one with an invisible block is air.)
-Every following statement checks if there is a light block in a 3x3 cube around the light, by searching different x, y, and z values, then replaces the light with air. (You could probably do this easier with a /fill command or a variable.)
Step Four: Test!
-Compile everything and spawn your mob!
[I know there's a few problems if two of these same mobs get close to one another, but nothing too serious.]
Nice tutorial :)
(And lol that's exactly how the Kobold from the one of my mods work XD)
Anyway, I don't know if things changed during the last updates, but traslucent should only be used when the texture has partially transparent pixels (like stained glass): if it only has either completely opaque or entirely transparent pixels it should just be set to transparent to prevent lag
I've known this already but what about underwater ?
I can't see the images D:
@minheragon12345 I think you should wait for waterlogged support for that, upvote the ticket on the tracker if you want it added sooner
@crispy_chips I didn't even realize there were images, my browser only rendered their titles as a text XD
The images should be working now!
this is helpful, and your mob is really cool!
Can you please help me make my armor model for my mod I wanted to make a 3d model but now I just want an at least close to an accurate model of what the item in hand looks like if you can help I'd gladly appreciate it, I'll even add an item to shout you out. here is what the armor unequipped looks like: https://imgur.com/a/LaBY4B9
its amazing the solutions we must try to get by simple coding that Mojang is to lazy... i mean minecraft is how old now? 10-15y? they could not even implement colored lights so far, no light on entities or items, and such... the only reason minecraft is still alive are the MODDERS, if was just Mojang this game would be dead 5 years ago.
One thing that you can get away with adding is an occasional update tick to your custom block and if a player doesn't exist next to it, it replaces itself with air.