Jump to content

LousyLynx

Members
  • Posts

    21
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Personal Text
    I am new!

LousyLynx's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. @tripl3dogdare I got it to work. I for some reason did not have my model correctly mapped in my blockstate. And as for making the mask ontop of the original model, I just made the "base" cube slightly smaller than the outer layer, which had the mask. Thanks for your help!
  2. @tripl3dogdare Yeah, it is still not working Thanks for the help so far, though!
  3. @tripl3dogdare It doesn't seem to be being called. Here is how I have the IBlockColor setup: Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler(new IBlockColor() { @Override public int colorMultiplier(IBlockState state, @Nullable IBlockAccess worldIn, @Nullable BlockPos pos, int tintIndex) { ALUtils.getLog().info("Tint: " + tintIndex); if(tintIndex == 0) { Key k = ALConfig.keys.get(state.getBlock().getMetaFromState(state)); return k.getR() << 16 | k.getG() << 8 | k.getB(); } return -1; } }, ALBlocks.LOCK.getBlock()); And here is the model: { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", "textures": { "0": "alutils:blocks/lock_side_0", "1": "alutils:blocks/lock_top", "2": "alutils:blocks/lock_side_1" }, "elements": [ { "name": "Cube", "from": [ 0.1, 0.0, 0.1 ], "to": [ 15.9, 15.8, 15.9 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 15.8, 15.8 ] }, "east": { "texture": "#0", "uv": [ 0.0, 0.0, 15.8, 15.8 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 15.8, 15.8 ] }, "west": { "texture": "#0", "uv": [ 0.0, 0.0, 15.8, 15.8 ] }, "up": { "texture": "#1", "uv": [ 0.0, 0.0, 15.8, 15.8 ] }, "down": { "texture": "#1", "uv": [ 0.0, 0.0, 15.8, 15.8 ] } } }, { "name": "Cube", "from": [ 0.0, 0.0, 0.0 ], "to": [ 16.0, 16.0, 16.0 ], "faces": { "north": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "tintindex": 0 }, "east": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "tintindex": 0 }, "south": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "tintindex": 0 }, "west": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "tintindex": 0 }, "up": { "texture": "#-1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "down": { "texture": "#-1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] } } } ] } I get no output ("Tint: 0") and the model still has no mask...
  4. @tripl3dogdare For the most part, yes. The only issue I am having is this: I only have one texture layer for my model, and as before, cannot find a tutorial to make multiple I know you can use `layer0` and `layer1` for items, but for blocks, I have no clue. This is my current model: { "forge_marker": 1, "defaults": { "model": "cube", "textures": { "down": "alutils:blocks/lock_top", "up": "alutils:blocks/lock_top", "north": "alutils:blocks/lock_side_0", "east": "alutils:blocks/lock_side_0", "south": "alutils:blocks/lock_side_0", "west": "alutils:blocks/lock_side_0" } }, "variants": { "inventory": [ { "transform": "forge:default-block" } ], "normal": { "model": "cube" } } } I am trying to get the sides (north, east, south, and west) to have the mask on it. Thanks!
  5. I am working on a mod where custom keys can be registered. These keys have a name and an rgb value. As of now, I have the key item being rendered with custom colors as a mask. I would like to get a "lock" block to render with a color like the key to be more obvious in saying "this is that key's lock". The only issue is that I have no clue on how to do that. There are not quite any tutorials on how to do that. Thank you!
  6. There is one huge problem with this that I have. The blocks maybe started at the server, then a packet gets sent to the client and adds a block, ok ok. No problems yet. What if the block is supposed to have a custom function, that is where it gets iffy. How would you send the extra information? This is in case of your custom "mods". What do you mean "What if the block is supposed to have a custom function"? If you are talking about the idea where the server could send the client information(1: you quoted the wrong message ), I am not sure about how I would do that. I will get there when I get there, but as of now, I want to make the api.
  7. I guess that loading models at startup is kind of defeating the purpose. I will think of something. Otherwise, thank you for your help. Now that I know I can do what I want to, I am quite happy. By the way, I have a couple of ideas that could take use of this concept, that could get really popular. I guess we will just have to wait and see
  8. Although all of those things sound like things that could be fixed with a reasonable amount of time. Get the models to load at the beginning, and load those, have the server send the ID's to the client(Assuming that we could set the ID to a specific value), make a method to somehow calculate the ID for caches. Correct me if I am wrong, but couldn't pretty much any error produced be fixed?
  9. By the way... If registering objects after the game is "not possible", how come I have done it here: https://github.com/LousyLynx/On-The-Fly. Video proof: It may be just for a block, but I am sure it will work the same way with items... Entities I am not so sure about. When I said I wanted to make an API for this, I did not mean that I would load and unload entire mods. And if you thought that is what I mean, I guess that was a mistake on my part. I meant that mods would be built around this API. The API would fire the events, register blocks, etc. Currently, the ID tables are stored with the world, so if you log out and back in, you won't get the block, but that is not something that should be built with my API(Or maybe I will make it an optional side part). The code for the API: https://github.com/LousyLynx/On-The-Fly
  10. Well, I was thinking that it might open up possibility. Say we have one mod on the client, and the same mod on the server. Say this mod allowed custom "mods" that are sent over to the player when they join. Then servers could have entire modpacks running on just one mod on the client, and the player would be able to essentially switch modpacks without even having to restart the client. That is just one theoretical example. Is there anything that I don't know that could make this example invalid ?
  11. I just think that having the option to register blocks, items, entities, etc. when the game is running would be a cool feature to have.
  12. Yes, during the runtime. As in if, outside of the loading Mojang screen. Possibly in game, or in a menu.
  13. Hello. I am working on a library to make registering objects during runtime much, much easier. I just have one question; is registering blocks, items, entities, etc. even possible? Or rather, do the current versions of forge allow for it?
  14. What exactly would I need to change, and where? I have tried to extend both my world provider, and chunk provider to the surface ones. This is my new ChunkProviderGenerate#populate override: public void populate(IChunkProvider provider, int x, int z){ int k = x * 16; int l = z * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16); biomegenbase.decorate(this.worldObj, this.worldObj.rand, k, l); super.populate(provider, x, z); }
  15. I am working on a mod somewhat like LexManos's YUNoMakeGoodMap. I want it to make the default overworld spawn generation have the same island type thing as in the End, but I want it to spawn like the normal Overworld, where it has dirt, stone, and ores. I have been looking around for a little bit now, and found this class in the source code for the ChunkProviderEnd class: public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_) { BlockFalling.fallInstantly = true; MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(p_73153_1_, endWorld, endWorld.rand, p_73153_2_, p_73153_3_, false)); int k = p_73153_2_ * 16; int l = p_73153_3_ * 16; BiomeGenBase biomegenbase = this.endWorld.getBiomeGenForCoords(k + 16, l + 16); biomegenbase.decorate(this.endWorld, this.endWorld.rand, k, l); MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(p_73153_1_, endWorld, endWorld.rand, p_73153_2_, p_73153_3_, false)); BlockFalling.fallInstantly = false; } I know this is for the spawning of the End island, but I want the code like in the ChunkProviderGenerate#provideChunk function, where it gives you to code of the actual generation. This is also a big deal, because the ender dragon is spawning, and I definitely do not want that. Thank you for your time!
×
×
  • Create New...

Important Information

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