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

SiniKraft

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by SiniKraft

  1. Hello, I'm trying to update my code from 1.16 to 1.18 As I can see, lots of imports changed (and others stuff) I've heard about a tool which automatically update code (of course I'll need to update other parts of code) But is there sth that changes, for example World into Level Thanks !!!
  2. Hello ! What I want is to make player able to jump and walk normally, but without any blocks below. I want to base my code on what the boat do, but I can't find any method or sth which shows me how player lands boat. Thanks!
  3. I know ๐Ÿ˜„ here it is : Item Class : https://pastebin.com/jFQsnafW When Left clicked block : https://pastebin.com/PttYmCyr On block right click with item : https://pastebin.com/ZwiZp2Qf
  4. Sorry, I did not use the right word .. Do I need to include the item class ?
  5. So you want I repost the entire java classes ?
  6. I know you can't convert for example double a; to int without (int). Of course I asked you a way to get it as CompoundTag. Thanks to your response, my code did compile ๐Ÿ˜ฎ But when trying to restore a block with its tile entity, items are not replaced !! I tried with a furnace, for example. I've put things to burn in it. I stored the furnace into my item, and placed back after. The new furnace was still burning (lit=true) but the items inside it disappears !! How can I fix that ?? Thank you ! ๐Ÿ˜
  7. Ok, I succeeded in saving TileEntity to item. BUT, when I'm trying to restore ... Here i'm trying to get Blockstate from save data in item. bs = NBTUtil.readBlockState(nbt.get("bs")); but I got error error: incompatible types: net.minecraft.nbt.INBT cannot be converted to net.minecraft.nbt.CompoundNBT It's strange because it can convert a CompoundNBT to INBT without any problems, but how can I do to INBT -> CompoundNBT ? Thanks!
  8. Okay I think I'll just low the explosion power ... ๐Ÿ˜‚
  9. Thanks for your reply. TileEntity.write() takes a CompoundNBT as first argument ? What I need to put in ? Or do I need to use getTileData() ?? Thanks!
  10. Wow ! Thanks a lot for your help. Just temporarily. Because an explosion of 12 000 power makes the server not responding for a long time, even on client, after 3 minutes of no response, I get in the console thread-?? died !
  11. Hello ! I want to make a potion effect which spawns randoms explosions at the player location. I've already disabled block damage. I want to know how to disable these explosions damage, only for the player which owns the effect. I don't want to completely disable damage of the player, just tnt damage. Also I want the explosion not to move the player, but to move any other entity around. How can I do that ?? (And how to increase server max tick time, but in game - not in server.properties -) Thanks in advance !
  12. Thanks for your reply !! I think I'm wrong, but i cannot see TileEntity#save or loadStatic. I don't know if I am right, but It seems that TileEntity doesn't contain the Container. And.. It must be a stupid question, but, how do I put this Nbt data to the item ?? Thanks a lot
  13. My goal is to make an item which store a block and all its data into an item. So that after you can restore this block in another place, with exactly the same data in it (direction, container, tags, ...) This is what I want to do. (PS: I wanted to convert all to string to put them easily on item tags) How can I do that ?? Thanks for your help !
  14. Hello ! Thanks for your reply ! Now I want to know how I can convert a Container in a String. Thanks !!!
  15. Thanks for your help but ... So If I want to check when the player press the vanilla jump keybind, how can I do this ? I know I can register a onKeyPressed event, but I can't figure how to check if jump key is pressed. Because Minecraft.getInstance().options.keyJump.getKey() Return the key selected, but not if this key was pressed. How can I check ? Thanks a lot for your help
  16. Hello ! I want to store a BlockState with his Tile Entity into playerdata. I managed to save BlockState per Player, but the TileEntity is not included in the BlockState Can I include A TileEntity in a BlockState ? If not, how can I separately save a TileEntity and restore it after ?? Thanks in advance
  17. I want to set my Custom KeyBind Key to the key selected for jump by player. How can I do that I don't want to change the default value, which is space, but wants to set My keybind to the jump's one. For example A player jump with K. If he changed my custom keybind to S I want it to set to K. Thanks
  18. Thanks for you reply. But ... How can I bind my custom keybind to this key I tried KeyBinding keys; keys = new KeyBinding("key.example_mod.jump", GLFW.GLFW_KEY_SPACE, "key.categories.movement"); keys.bind(Minecraft.getInstance().gameSettings.keyBindJump.getKey()); and KeyBinding keys; keys = new KeyBinding("key.example_mod.jump", Minecraft.getInstance().gameSettings.keyBindJump.getKey(), "key.categories.movement"); and replacing the get key method with the one you provided Minecraft.getInstance().options.keyJump.getKey() But nothing works ! It compiles but doesn't change my keybind if i have modified it in the Minecraft settings gui. What can I do Thanks a lot !!!
  19. Thanks for your advice !!! Now all the things I wanted works except the KeyBind change. The Keybind is only defined on jump key when the Keybind wasn't in options.txt So now what I want is setting My KeyBind to the key defined for jump by player Each time world is loaded. How can I do that ?
  20. Thanks ! I made a keybind which sets itself on the key choosed for the jump keybind each time game load.
  21. Hello, I have an item which call a procedure each inventory tick. This item overrides Player motion vector to 0. However, the player can't jump. How can I get if the jump key is pressed, on PlayerEntity ? Is there sth like player.isKeyPressed(...) or do i need to register an event for this ? If so, how ? PS: 1.16.5 Thanks in advance !
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.