Jump to content

MFMods

Members
  • Posts

    369
  • Joined

  • Days Won

    13

Everything posted by MFMods

  1. of the top of my head (it's been many years and i will not set up the 1.8 workspace): there is a method getBlockMetaSomething (maybe getBlockMetadata or getBlockMeta, not sure); call it after the getBlock call, printout metadata (integer, 0-15). find the values for colors that interest you.
  2. if you have a location (BlockPos type, get it from your entity) and a world (Level, also available in any entity), ask the world for light level at that location. you can also ask if the "block" at location can see the sky, etc.
  3. remove half the mods you have. if that did not solved the problem, repeat (remove half of the remaining half). if it did, culprit is in the removed half. switch groups. remove half. repeat. repeat until you find the culprit. then tell mod authors.
  4. make a new world for testing. do binary search until portal works.
  5. no. world generation is now done through resources (json files). good news: modpack makers can change most things; bad news: it's a nightmare for devs and you picked a horible task for an inexperienced modder. i'd switch to another plan if you have plans for multiple mods. if you must go forth, check out mcjty on youtube. there are online generators for worldgen jsons, use those (after you go through a tutorial).
  6. not really a minecraft question. what i will tell you is that there are three types of config files: client (you want that one), common (it's the one you want for most things) and server (stored in game save folder; separate values for each save game).
  7. 1) figure out how to use events. (find forge community wiki or forge docs) 2) subscribe to level tick event. 3) check that the level in event is overworld. overworld is always loaded. 4) check the side (level.isClient). you likely want to do thing only on server side. 5) get the total time in ticks from the level. compare with saved value and be sure that at least 20 ticks (1 second) have passed. (obviously there are multiple ways to do this part).
  8. yeah, you can do that (make a data pack for recipes and loot tables and make an asset pack for models and textures). i'll tell you right away it would be a lot of work and questionable benefit - there are already mods that allow you to add items with a few lines of text and a png file. there always have been. if you really must, investigate source code of BuddingCrystals by XFactHD.
  9. you did it on client only. all changes need to happen on the server. client only actions can be particles, toasts, etc. in useOn(), first check the side - if not client then printBlocks. outside of the check, return proper value (see below). do not call super.useOn - let's say you right-clicked a lever. you do not want to generate your island in front of the lever and then flip it as a bonus. have one or the other. you may want to support both via crouching check but i wouldn't. return InteractionResult.sidedSuccess(level_is_client). that will give you a hand animation on client. if you're in a good mood, don't make a hundred BlockPos objects. make one BlockPos.Mutable, call set to move it around before use.
  10. > How do I make an item have two textures, one held, and one in the inventory an example of that would be a trident. > Also, how do I double the size of the held item model? open the model in blockbench (or just make a new one). set scale and angles for left hand, right hand, item frame (fixed), etc.
  11. looks like twigs' author changed blocks and didn't update every compat. you're going to have to choose between the two mods until that is fixed.
  12. what he said. ...except instead of state.getBlock() == Blocks.grass you should say state.is(BlockTags.DIRT) . tags are not a new thing and people need to use them. also, instead of that BlockPos constructor use above() call in BlockPos.
  13. so, your wish is to be a real boy? good. first follow a tutorial on how to start dev environment. do not edit anything in the example mod. only after the game starts with example mod, start editing it. vanilla block types are accessible through Blocks class (Blocks.something). find one that matches your block type, follow it to creation to discover the block class. have your block extend that. things like bonemeal, etc. will work but you can override all. loot table (block dropping item) won't work. copy from the most similar block or (not easier) follow a tutorial.
  14. it's a simple problem, that's why solution is easy to miss. you will have one main block (if you have a block entity, attach it to that one) and 4 secondary blocks (adjacent to the center one) and 4 tertiary blocks (in corners, adjacent to two secondary ones). you will have block properties (accessed via blockState.getValue) which need to be enough for you to locate the main block. for example if current block is secondary and its "facing" is south, main block is one to the north. override canSurvive if block is tertiary check two adjacent positions (according to blockState); if either is not secondary, return false. if block is secondary get a position of main, get block, if it isn't primary return false. if block is primary and was just placed return true if block is primary get 4 adjacent postitions, return false if either isnt secondary block return true. that's basically it. you may keep canSurvive() it in one block class or split into two (or three if you must), but that method is the only thing that you need to break multiblocks. you also need this one (identical in all of my multiblocks): @Override public void neighborChanged(BlockState state, Level level, BlockPos rackPos, Block block, BlockPos wallPos, boolean something) { super.neighborChanged(state, level, rackPos, block, wallPos, something); if (!this.canSurvive(state, level, rackPos)) { level.destroyBlock(rackPos, true); } }
  15. 1) there is a player tick event. it fires 20x per second for each player. obviously you don't need that precision, skip 19/20 ticks or even 39/40. check items in inventory there. first check that it's a server player. 2) player has a field holding remaining air. just reset it to max. there are ways of preventing that field from being reduced but those are far more difficult that just setting the field to the max value.
  16. use java 17 for minecraft 1.18 to 1.20. lose optifine, i understand poor framerate, i intimately understand, but since we now have sodium/lithium (use forge ports), optifine can just go and die.
  17. well read the message. it says you have two mods with the same id. go through the list of mods above but go from the end of the list (hint).
  18. https://modrinth.com/mod/stopmodreposts while the problem they try to solve is real, not letting you play when their site is down is not clever.
  19. it was fixed in the new version. https://legacy.curseforge.com/minecraft/mc-mods/better-jukeboxes/files
  20. please share the link then. i would agree that redirecting towards NF communities is somewhat unfair, but only starting now that i know that there is a forge discord.
  21. go to forge community wiki and read about config files. short version: server configs are per-world. common configs are singular (one value for all worlds and all players), client configs are per-players (reserved for visual details). edit: and ffs, do not ask a guessing machine anything. there are forums with real modders, discord servers with real modders, youtube (with 5 real modders and 995 dumbass kids (if you hear a squeaky voice, stop and leave) ), there is FCW... do not ask a guessing machine.
  22. replace file tree line with implementation 'flat.dir:JarName:1.2.3' where filename is JarName-1.2.3.jar under libs. add fg.deobf depending on how the mod A is compiled. alternatively, pull mod A from modrinth or curseforge. clean and simple if there won't be more (or much more) changes to A.
  23. took me a while to stop shuddering. you asked a guessing engine how to do something? you have two options: one - look inside the game code. if you have no patience to do so, you will not make a decent mod. ever. option two - ask living people on forge forum or NF discord.
  24. that is not how we do it in modern era. you probably found decade old instructions on mc forum... if your dependency mod is on curseforge or modrinth, just pull it from there. go to curseforge page of your mod, if there is "legacy" prefix in address bar delete it. find the file, click the copy button. paste into dependencies section (where the jei example line is). if it's not on curseforge/modrinth, use a flat dir dependency (see community wiki). repositories { maven { url = "https://www.cursemaven.com" } } dependencies { minecraft '...' implementation fg.deobf("curse.maven:SOMETHING:SOMETHING") }
×
×
  • Create New...

Important Information

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