Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Potato5

Members
  • Posts

    17
  • Joined

  • Last visited

Potato5's Achievements

Tree Puncher

Tree Puncher (2/8)

2

Reputation

  1. here's an alternative - look at the lilypad code. when the player uses lilypad item, that class checks what's exactly in front of player.
  2. why would a recipe depend on a block entity? you know there could be several around filled with different combinations of materials. i don't get what you want so how about you do this - make a jei plugin that adds one dummy recipe; then work up from there. if you don't know how, look at the source of some mod that adds recipes (farmer's delight, etc.), there are many on github.
  3. a little of topic, there is really, really no need to do it 20 times each second.
  4. welcome to the club! what you want to do isn't easy and you should really do a few simple learning mods before that. even something that you wouldn't release or even play with yourself. there are things you need to learn. first thing you need is events. whenever there is a question "when", events are the answer. you can respond to player tossing an item, or a skeleton joining world, or item despawning, or farmland about to be trampled, etc. some events you can cancel (basically say no to mob about to spawn, or to farmland about to be trampled), in some events you can do more than just say no (when stick item is about to despawn, you may prolong its life by x seconds, etc.). https://forge.gemwire.uk/wiki/Events anyway, you need events to answer the first question - when do we display gui. forget the gui for now and make it a simple message in chat by saying player.displayClientMessage(Component.literal("show gui now"), false); do not proceed with gui until you have this message shown when player first joins the game and until you ensure it's not shown next time. ok next - you need networking https://forge.gemwire.uk/wiki/Using_SimpleChannel/1.18 , https://forge.gemwire.uk/wiki/Sides/1.18 , and a few more pages. then gui, but after networking. do you still want to make a mod with gui window as your first mod?
  5. easy way is to replace java -Xmx1G -jar forge-1.19.2-43.1.1-installer.jar with java -Xmx1G -jar C:\Users\tlnie\Downloads\forge-1.19.2-43.1.1-installer.jar which may not work because i can't really guess where the file is. super easy way is to install multimc, make a game version, add forge to it (there is a command in multimc), then download a few mods and move them into mods folder which you can open from multimc and you don't even need to know where it is.
  6. right. sorry. very tired. it doesn't even make sense what i said. you don't need that installer for making mods. anyway, consider multimc launcher. it's a perfectly legitimate option (it requires mojang account or microsoft token thingy to start the game). it doesn't work with curse modpacks i think (i'm not sure), but if you just want to download a few mods, throw them into mods folder yourself, it's simple and works perfectly. and you can have multiple game versions. and multiple loaders in those multiple versions...
  7. i didn't mean type "path_to_installer" literally! put path to your download location in place of that. and seriously, either learn about file and folder management or give up on creating anything and go back to watching tv. you can not make a good mod without knowing what to do with files. how will you make a png file and put it where it needs to be? how will you make block models (text files) and put them where they need to be? you don't have an option to skip this.
  8. so, either change the command to java -jar path_to_installer\forge-1.19.2-43.1.1-installer.jar or use cd to move to your downloads directory and then run the unchanged installer command. the later option is better.
  9. we didn't get to coding. we don't know where file forge-1.19.2-43.1.1-installer.jar is. dir command would tell you that it is not in C:\Users\tlnie directory, and you are running a command from there. go back to browser, open downloads and figure out where the installer is.
  10. run a command dir *.jar (for yourself, not us). you probably need to go into downloads directory.
  11. from your image i can't tell if the structure is resources/assets/texture or resources/assets.texture. check with file manager. maybe ide made a directory with a dot?
  12. yikes! ok, first general advice: if it feels like you are pushing a wall (trying to move it) - you are probably on the wrong path. i am serious and this is an important advice. walls have holes in them - doors. stop and look around. don't just move forward and push. now to your topic. first of all, delete all that crap up there. text components are usually created in two ways: Component.translatable("some.key.from.lang.files") or Component.literal("space dash space or something like that") styles are often added to components in anonymous manner, especially if the components are reused: private final Component messageSevere = Component.translatable("message.something.lang.file").withStyle(Style.EMPTY.withColor(TextColor.fromRgb(0xc84030))); if you recognize the need to store a style and apply it to newly created components without creating needless identical style objects (points for you), do it like i do - start from empty style, make yours, store it for later and apply it to components with withStyle method like above.
  13. general advice: hit ctrl+space after the dot (before the method name). you get a list of methods. how many take a single argument of type Hand and return nothing? i'm guessing you're using old game version so we likely won't help you more.
  14. i said don't use HALF because it's set of values - upper and lower - is simply not what you need. but if you need us to write the block for you, maybe you should make a simpler mod. these isn't one way to make a multiblock, there are many. here's how i do it: make a new property: public static final BooleanProperty BEING_PLACED = BooleanProperty.create("being_placed"); // ignore blocks around it not matching multiblock and in createBlockStateDefinition add two properties to a block state: BlockStateProperties.HORIZONTAL_FACING and yourblock.BEING_PLACED . first of the two properties is rotation of your table or whatever it is. second is not visible but it's important - it suspends canSurvive method when the firsh half is placed but before the structure is finalized. so, canSurvive is like this: if state.getValue(BEING_PLACED) == true then return true; if world.getBlockState(pos.relative(HOR FACING)).getBlock().equals(other part) return true; return false; and the other part is placing the multiblock - you bay have a special item for it or you do it in worldgen. you do it like this level.setBlock(position, block1...(facingToSet)...(BEING_PLACED, true)); level.setBlock(position.relative(...), block2...(facingToSet)...(BEING_PLACED, true)); level.setBlockAndUpdate(position, block1...(facingToSet)...(BEING_PLACED, false)); level.setBlockAndUpdate(position.relative(...), block2...(facingToSet)...(BEING_PLACED, false));
  15. yes, HALF is one-dimensional. doesn't work for you. remove it. your situation - some sort of worktable - is two-dimensional.
×
×
  • Create New...

Important Information

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