I decided to make a Forge modding library, something that provides a bunch of classes, methods and helpers, to make modding Minecraft with Forge easier -- similar to Mantle by Slime Knights. But to start, I wanted to ask if people had anything that they find tedious when modding, and if they would benefit from a library that handled all that already.
For example, I noticed people ask how to make crafting recipes based off items' NBT values (which currently does not exist), so my library would provide an easy way to register recipes sensitive to NBT data (so that you could make a recipe that required a sword with a specific durability or name, for example)
Anything along those lines, or anything else that you would find useful in a common library, please let me know.
I'm probably going to make this mod, if that's okay with you. I might also add some features here and there if I come up with some. I'll cite this thread, of course.
I've been working on a mod that registers blocks to the client when it connects to the server, allowing for servers to have custom mods that the client doesn't need to have downloaded when joining. The issue I'm having is that the items are registered successfully, the Resource Pack loads correctly (evidenced by the one static item added changes texture), but the items added on join aren't receiving textures. No errors are thrown, no crash, just that wonderful pink and black checkerboard.
In case you're wondering, the Resource Pack is a folder that is reflected into the default minecraft one on join as well. This is reloaded on Join to apply the changes too. The JSON models for each item added on join are generated correctly, they just dont apply whatever texture are in them (not even default forge/MC ones)
Thanks for any help you can provide
Reloading MC's resources (emulating a resource pack change) should do the trick in resolving texture dependencies. I'm not at my IDE at the moment, but it might have something to do with registering textures during a specific client initalization phase (I'm guessing here). I'll take a look and see if I come up with anything
EDIT:
Try looking at how servers distribute required resource packs to connected clients?
Not sure what your problem is. Could you elaborate? There isn't anything preventing you from creating a mod within a git repo as they are just folders. I've done it a bunch of times.
Whoops, completely missed the RESOLVED tag. My bad :3
I am currently working on a new idea for a mod, but have gotten a little stumped. I want it to be that when an item is dropped (by a player or machine, such as a dropper) the item would despawn and a mob would spawn in its place. I know this should be simple but I am completely stumped. I have been trying to accomplish this with a ItemTossEvent, which is semi-successful.
@SubscribeEvent
public void ironNuggetDrop(ItemTossEvent e){
World world = e.getEntity().world;
Item item = e.getEntityItem().getEntityItem().getItem();
BlockPos pos = e.getEntityItem().getPosition();
1) The item immediately despawns, so you do not even see it. Which I want it to be there for like a second if possible.
2) It does not work with droppers and such.
3) The mobs are spawning in random orientation instead of where the item lands, which is what I wanted.
So I went into another option which is to create a custom EntityThrowable. This kind of works, except I could not get a custom particle to work so it still shows nothing and a mob just spawns. And it also does not work with droppers.
Any help would be greatly appreciated
Thanks
OC
If you are doing this to a custom item, look at Item.hasCustomEntity and Item.createEntity
Is there a way to modify the output of furnaces? I specifically need to make it so when the item(s) are finished smelting/cooking, block in the fuel part of the furnace will turn into carbon (which is an item in my mod).
In order to change the item in the bottom slot after the item has finished smelting, you are going to have to extend and override TileEntityFurnace with your own class. In that class, add your own if statement in the smeltItem method. Annoying, Mojang hardcoded the wet sponge -> water bucket output, but that's an example of how it's done.
It would only make sense that this would work, but for some reason it keeps setting targetX, targetY, and targetZ to player.posX, player.posY, and player.posZ. I think getlookvec is broken :/
Look at Minecraft.objectMouseOver and RenderGlobal.drawSelectionBox
I don't have one yet, I wanted to know if it's possible. How would the code layout be? Are there any mods out there that do something similar to what I'm asking?
In terms of an actual .schematic file, you would have to read and interpret all the NBT data within it and use that data to place all of your blocks. Alternatively, you can try to find a .schematic to Java converter, but all the ones I've seen are outdated and don't work with the new block state methods. It is definitely possible, though. The actual code will, in its simplest, be lots and lots of world.setBlockState calls.
When you call model.renderAll(), OpenGL uses the last bound texture to define the render points and stuff. If you want different parts of your model to render with different textures, you need to render each part separately and bind the new texture in between each render call.
Although, you should not be using 1.7.X anymore anyway. It's no longer supported by the devs or anyone.
I'm enjoying the way you set up things so far, but have you panned any story for the new dimension at all, or have any plans for more unique things to add to it?
Hey all,
I've just been really busy with college stuff lately (it's a massive pain, lol). I plan on fixing all the bugs and stuff that people brought to my attention. In terms of content like story and stuff, I'm not so sure on how to proceed, so I'm open to ideas!
I'm having trouble installing the mod. I install LiteLoader for 1.11.2 and it runs fine without the mod. However, when I try to run the mod, my game crashes during loading. From the console, it crashes sometime in the init. It prints, 'Calling late init for mod VoxelMap', generates the waypoint and chooser atlases, then crashes with exit code 1073740791.
Nevermind, I just decided to count them. If anyone else is curious, blocks that emit the max light level illuminate a total of 4089 blocks (assuming no obstacles)
Does anyone know the maximum number of blocks a sea lantern can light up (I ask sea lantern because the wiki says it outputs the max light level). I'm not really sure how the lighting calculations work (only that the max light level is 15 and that it affects blocks in 3D) which is why I'm asking
0
I decided to make a Forge modding library, something that provides a bunch of classes, methods and helpers, to make modding Minecraft with Forge easier -- similar to Mantle by Slime Knights. But to start, I wanted to ask if people had anything that they find tedious when modding, and if they would benefit from a library that handled all that already.
For example, I noticed people ask how to make crafting recipes based off items' NBT values (which currently does not exist), so my library would provide an easy way to register recipes sensitive to NBT data (so that you could make a recipe that required a sword with a specific durability or name, for example)
Anything along those lines, or anything else that you would find useful in a common library, please let me know.
0
I'm probably going to make this mod, if that's okay with you. I might also add some features here and there if I come up with some. I'll cite this thread, of course.
0
Reloading MC's resources (emulating a resource pack change) should do the trick in resolving texture dependencies. I'm not at my IDE at the moment, but it might have something to do with registering textures during a specific client initalization phase (I'm guessing here). I'll take a look and see if I come up with anything
EDIT:
Try looking at how servers distribute required resource packs to connected clients?
0
Not sure what your problem is. Could you elaborate? There isn't anything preventing you from creating a mod within a git repo as they are just folders. I've done it a bunch of times.
Whoops, completely missed the RESOLVED tag. My bad :3
0
If you are doing this to a custom item, look at Item.hasCustomEntity and Item.createEntity
0
In order to change the item in the bottom slot after the item has finished smelting, you are going to have to extend and override TileEntityFurnace with your own class. In that class, add your own if statement in the smeltItem method. Annoying, Mojang hardcoded the wet sponge -> water bucket output, but that's an example of how it's done.
0
Look at how vanilla handles and registers Villagers
1
Look at Minecraft.objectMouseOver and RenderGlobal.drawSelectionBox
0
In terms of an actual .schematic file, you would have to read and interpret all the NBT data within it and use that data to place all of your blocks. Alternatively, you can try to find a .schematic to Java converter, but all the ones I've seen are outdated and don't work with the new block state methods. It is definitely possible, though. The actual code will, in its simplest, be lots and lots of world.setBlockState calls.
0
When you call model.renderAll(), OpenGL uses the last bound texture to define the render points and stuff. If you want different parts of your model to render with different textures, you need to render each part separately and bind the new texture in between each render call.
Although, you should not be using 1.7.X anymore anyway. It's no longer supported by the devs or anyone.
0
Hey all,
I've just been really busy with college stuff lately (it's a massive pain, lol). I plan on fixing all the bugs and stuff that people brought to my attention. In terms of content like story and stuff, I'm not so sure on how to proceed, so I'm open to ideas!
1
Yep that fixed it. Thanks
0
Hi,
I'm having trouble installing the mod. I install LiteLoader for 1.11.2 and it runs fine without the mod. However, when I try to run the mod, my game crashes during loading. From the console, it crashes sometime in the init. It prints, 'Calling late init for mod VoxelMap', generates the waypoint and chooser atlases, then crashes with exit code 1073740791.
0
Nevermind, I just decided to count them. If anyone else is curious, blocks that emit the max light level illuminate a total of 4089 blocks (assuming no obstacles)
0
Hi,
Does anyone know the maximum number of blocks a sea lantern can light up (I ask sea lantern because the wiki says it outputs the max light level). I'm not really sure how the lighting calculations work (only that the max light level is 15 and that it affects blocks in 3D) which is why I'm asking