Jump to content

MFMods

Members
  • Posts

    369
  • Joined

  • Days Won

    13

Everything posted by MFMods

  1. what you need to make is a StructureProcessor. look into classes that extend StructureProcessor (ctrl+H in idea ide). instances of that class replace single blocks in structures. that part was easy. second part is squeezing one into the game. you need to find a configured feature/structure, find a list of processors and add your processor into processor list. you may need an AT or two but i don't expect you'd need mixins.
  2. try adding "rendertype": "minecraft:cutout" between parent and textures rows. if it doesn't work (meaning you're on older version of minecraft), make a handler for FMLClientSetupEvent event and say ItemBlockRenderTypes.setRenderLayer(Block1, RenderType.cutout());
  3. i don't know man. you (not just you-you; all you whiny countesses) toss in 50 mods instead of adding them two by two slowly, you don't take time to configure them two by two on a test world like it's supposed to be done, you just strike a pose and ask us "oh why do my leaves fall off, i just tossed in a bunch of mods including one season mod and i was to busy to read what they do."
  4. make a handler for ItemTooltipEvent event. add one or more translatable components into a given list.
  5. try player.damageSources().something.
  6. disclaimer: i do not know what you are asking. i'll guess and maybe this will cover your question: so you have two ores: ore1 and ore2. register blocks (smoothstone ore, deepslate ore, storage block) unconditionally. add them to tags. crafting and machine recipes should use tags only. register items (ingots, nuggets, dusts, raw ores...) unconditionally. assign tags to items. worldgen (ores in terrain) can and should be conditional - if i don't want your ore2 (maybe another mods add the same or i just don't want it) then let me not have it generated. do not worry about duplicates from other mods, just add tags and that's that.
  7. you know - like an e-mail. because the game instance where you click the button and the instance where the things happen (server) are two separate game instances, possibly on two separate computers (or on the same computer but that changes nothing). https://forge.gemwire.uk/wiki/SimpleChannel https://forge.gemwire.uk/wiki/Sending_Packets
  8. lose optifine. i used optifine to improve fps on my radeon 4200 but you're not in the same boat as me. the era of optifine has passed. it is the era of sodium (rubidium in case of forge users) and lithium (i think the forge port is called canary, there might be more than one) and it's a good time. we can get decent performance upgrade without optifine annoying users and infuriating modders.
  9. examine the source code of this mod: https://legacy.curseforge.com/minecraft/mc-mods/commandstructures
  10. if it's your sapling block that there is no problem - because for the player, sapling is something that looks like a sapling and grows into something. so, in block ticks (random 1/minute ticks, do not make a ticking block entity), when it's time to grow to final stage, just pop the structure from the external file. the block need not be a sapling (in terms of extending vanilla blocks) at all.
  11. first issue (not a cause of you problem but i can't ignore it) - buttons should not know about outside logic. they should fire a click event or toggle (change state) event and that's it. screen should provide handler for the button click event then it (screen) creates a button. menu classes are... problematic. at first at least. the thing is you have TWO instances of menu class living at the same time. some parts execute on client, some parts on server. for example slot contents change happens on server and that (and there) is usually where you do your crafting. if the crafting is triggered by a button, you send a client-to-server message that the button is pressed. and only that - only the button identifier (of there are more buttons); message is to contain no information about slots etc. message handler receives the message, it gets the server player corresponding to client player that sent the message, gets the menu opened for that player, casts to your menu and calls some method.
  12. in theory, yes, you might be able to. in reality, if you don't start with a simple mod first, you will give up completely. you have a vision. i get it. i'm not saying forget it - just shelve it. write your plan in a text document and shelve it for a few days. now come up with something you can do in a few hours (it will take no less than a day for a first one but never mind that). isn't there something small that you wanted to change? some tweak? for example detect a cow being hit and make all nearby cows freak out, not just that one. or detect a sheep being killed and if the perpetrator is a wolf, remove meat from the list of drops... whatever. something simple. do not make big things until you make one tiny mod.
  13. install java 17 if you didn't already (go to adoptium.net). change java version in your project properties to 17. change java version in run configuration to java 17. in runClient configuration, after you set java ver to 17, there is a module box - it should say modid.main. run again.
  14. try the same thing with zero mods. do not add mods until you can start and join server with zero mods. then add five by five and check again.
  15. well, i learned something about minecraft today. anyway, just use EnchantedBookItem.addEnchantment() for books. how am i so incredibly knowledgeable? well i just placed a cursor on Items.ENCHANTED_BOOK, hit alt+F7 (search for references) and found one occurrence with the answer. edit: oh and start with book book, not the enchanted book.
  16. i have no idea how you have an enchanted book that isn't and enchanted book. anyway, there are mods that show you item's nbt. use one in creative mode to see what you want and compare it to what you have.
  17. i will assume you're porting from an old version, not working on an old version. use Component.literal("untranslatabletext") or Component.translatable("key.from.lang.file") if you're on 1.18, use new TextComponent and new TranslatableComponent instead of the above.
  18. try again - second mob (a test mob) from the start. follow my checklist:
  19. we need to see console log (it's in be bottom section of your ide). and download a 1.18.2 mdk. nobody plays 1.18.1 and you can't mix versions.
  20. use the setBlockAndUpdate. it is functionally equivalent to passing 3 as flags (1+2) and will update the clients.
  21. search the console log for any warnings and errors. try the summon command in-game and look at log again. if ForgeSpawnEggItem doesn't work (and you tried it seems), then there is likely something in the log.
  22. yeah. i tried a lot harder than you did, trust me. keep the big one you already made and use it for item model. make two copies, delete bottom portion in one, delete top portion in the other and translate upwards.
×
×
  • Create New...

Important Information

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