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


Forge Modder
  • Posts

  • Joined

  • Last visited


  • Gender
  • Personal Text

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

SuperHB's Achievements

Creeper Killer

Creeper Killer (4/8)



  1. I'm not sure if this is the best implementation, but I did it like so: In the GUI class, when the button is pressed (checked with actionPerformed) you use your packet handler to send to server a custom message with the information you need. When the message is sent to the server, you can set the variable on the server side with a handler. Then inside the server handler you can send a packet to players.
  2. I meant if the player is in singleplayer or multiplayer. mc.getMinecraft().isSingleplayer() is false when I connect to a dedicated server or when I join a LAN server, but true if I host one. I thought once I turned on LAN to host, mc.getMinecraft().isSingleplayer() would become false, but it stays true, even if a player joins. Basically, when I host a LAN, I need someway to tell the GUI that the player is no longer playing singleplayer
  3. I'm working on GUI to play pong and I want to add multiplayer to it. I don't want the multiplayer menu to show up when the player is in singleplayer. I have mc.getMinecraft().isSingleplayer() called in the GUI's constructor to check if the player is playing singleplayer or not, but I'm having an issue. This works perfectly fine with dedicated servers, but when playing LAN, players who join isSingleplayer() is false, but true for the host. Is there any other way to fix this? (Or maybe a different way to check if on a server?)
  4. Thank you! It worked. I don't know why I didn't of that myself.
  5. So I'm working on a mod trying to recreate Pac-Man in Minecraft, currently I have an integer that increases by 1 to move that's called in drawScreen. The issue with this is that the amount of times drawScreen is dependent on FPS. To fix this, I tried putting it in updateScreen which is called 20 times per second. The issue with this is that now pacman moves too slowly and changing it to increment by 3 so that it would be the same speed as 60 FPS wouldn't work. This wouldn't work because every time the move integer is increased by 1, another function is called right after to make sure pacman stops if there is a wall in the way. When the integer increments by 3, pacman moves 3 spaces before checking for a wall, which causes him to go through the wall and keep going or get stuck in the wall. I was wondering if there was some way to limit the FPS while in a GUI?
  6. I copied your code and was able to open the control screen. Where are you calling registerKey() though? I had it at the end of addKeys()
  7. This is how I registered my keybinds (https://github.com/KenLPham/ArcadeMod/blob/1.11.2/src/main/java/superhb/arcademod/util/KeyHandler.java) and I don't have any problems with it. When do you call registerKeys? Copying your method worked, but I called registerKey in addKeys() Also I think if you want to use your lang file for the Categories and Key Description you need to use I18n.format() (I'm guessing that's what you want to do considering what you've named it)
  8. Doing some research, this is how you would register sounds in 1.12: https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/2cb7b67adf7ab41e066c3308ac898224b2891752/src/main/java/choonster/testmod3/init/ModSoundEvents.java I'm pretty sure you have to call the registry from preInit (maybe) but it doesn't seem to be from the example. Based on the example linked, I'm guessing you will have to call the registered soundevent like so Minecraft.getMinecraft().getSoundHandler().playSound(new PositionedSoundRecord(ModSoundEvents.RECORD_SOLARIS, SoundCategory.BLOCKS, 1.0f, 1.0f, playerPos)); Hope this helps. If it doesn't, then my help ends here as I haven't worked with 1.12 yet.
  9. I've never worked with 1.12 before. But are you calling playSound on client side? you can also try just calling the sound like so. ResourceLocation local = new ResourceLocation("morecommands:easteregg"); SoundEvent event = new SoundEvent(local); Minecraft.getMinecraft().getSoundHandler().playSound(new PositionedSoundRecord(event, SoundCategory.BLOCKS, 1.0f, 1.0f, new BlockPos(0, 0, 0)));
  10. I'm guessing this is for 1.11 (I'm not sure if 1.12 is different) Did you register your sound with GameRegistry?
  11. Having the transform in defaults doesn't change it. Seems to only work when I have it in facing.
  12. alright, so i literally put "transform": "forge:default-block" everywhere and it now works. It seems like it has to be in the "facing" variants... which also breaks the block from being able to rotate... { "forge_marker": 1, "transform": "forge:default-block", "defaults": { "transform": "forge:default-block", "model": "arcademod:generic_machine.obj", "custom": { "flip-v": true } }, "variants": { "game": { "snake": { "transform": "forge:default-block", "textures": { "#Back": "arcademod:blocks/generic_machine" } }, "tetrominoes": { "transform": "forge:default-block", "model": "arcademod:tetris.obj" }, "pacman": { "transform": "forge:default-block", "model": "arcademod:pacman.obj" } }, "facing": { "south": { "transform": "forge:default-block", "y": 0 }, "west": { "transform": "forge:default-block", "y": 90 }, "north": { "transform": "forge:default-block", "y": 180 }, "east": { "transform": "forge:default-block", "y": 270 } } } } EDIT: Since my ItemMeshDefinition only tries to get the facing=north variant I removed all the other "transform" except for the one under "facing=north" and that fixed my block facing issue. Except for north. I can switch ItemMeshDefinition to get "facing=south" as a way around this. But is this a bug? as putting the transform under "default" or anywhere else didn't work
  13. I added an OBJ block to my mod that also renders the OBJ model as an item. When I try changing the gui display rotation or scale, nothing changes. All it looks like is flat with no rotation. This is my current blockstate json file. I've tried using gui display as well and that didn't work either. I'm pretty sure the model isn't changed for thirdperson or hand display either. { "forge_marker": 1, "defaults": { "model": "arcademod:generic_machine.obj", "custom": { "flip-v": true }, "transform": "forge:default-block" }, "variants": { "game": { "snake": { "textures": { "#Back": "arcademod:blocks/generic_machine" } }, "tetrominoes": { "model": "arcademod:tetris.obj" }, "pacman": { "model": "arcademod:pacman.obj" } }, "facing": { "south": { "y": 0 }, "west": { "y": 90 }, "north": { "y": 180 }, "east": { "y": 270 } } } }
  14. I have a block that uses a OBJ model that is visible with the model also as the ItemBlock. The issue I'm having right now is that the model seems to ignore the display transformations. It did however work with the "transform": "forge:default-block" (or whatever is called). But I can't seem to get it to work with my own display values. This is my current Blockstate file. I've tried putting the display outside of the defaults, in the game values of the game variant, and inside the default. { "forge_marker": 1, "defaults": { "model": "arcademod:generic_machine.obj", "custom": { "flip-v": true }, "display": { "gui": { "rotation": [ 30, 225, 0 ], "translation": [ 0, 0, 0], "scale":[ 0.2, 0.2, 0.2 ] }, "ground": { "rotation": [ 0, 0, 0 ], "translation": [ 0, 3, 0], "scale":[ 0.25, 0.25, 0.25 ] }, "fixed": { "rotation": [ 0, 0, 0 ], "translation": [ 0, 0, 0], "scale":[ 0.5, 0.5, 0.5 ] }, "thirdperson_righthand": { "rotation": [ 75, 45, 0 ], "translation": [ 0, 2.5, 0], "scale": [ 0.375, 0.375, 0.375 ] }, "firstperson_righthand": { "rotation": [ 0, 45, 0 ], "translation": [ 0, 0, 0 ], "scale": [ 0.40, 0.40, 0.40 ] }, "firstperson_lefthand": { "rotation": [ 0, 225, 0 ], "translation": [ 0, 0, 0 ], "scale": [ 0.40, 0.40, 0.40 ] } } }, "variants": { "game": { "snake": { "textures": { "#Back": "arcademod:blocks/generic_machine" } }, "tetrominoes": { "model": "arcademod:tetris.obj" }, "pacman": { "textures": { "#Back": "arcademod:blocks/generic_machine" } } }, "facing": { "south": { "y": 0 }, "west": { "y": 90 }, "north": { "y": 180 }, "east": { "y": 270 } } } }
  • Create New...

Important Information

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