Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.16.3] how to make block click to open custom gui?
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
peanutexexe

[1.16.3] how to make block click to open custom gui?

By peanutexexe, October 29, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

peanutexexe    0

peanutexexe

peanutexexe    0

  • Tree Puncher
  • peanutexexe
  • Members
  • 0
  • 5 posts
Posted October 29, 2020

hi I'm korean.

I'm not good at English

 

I want block click on custom gui

 

I'm beginner

I running a translator now

 

한국인들 저좀 살려주세요

 

당근  <- This is korean Language

carrot

 

 

Now I want gui is crucible

 

First thank you

  • Quote

Share this post


Link to post
Share on other sites

vemerion    56

vemerion

vemerion    56

  • Creeper Killer
  • vemerion
  • Members
  • 56
  • 220 posts
Posted October 29, 2020

What have you tried so far? Have you looked at the vanilla source code to get an idea of what you would need to do?

 

If you only need a GUI, you would have to create a new class that extends the Screen class, which you would pass into Minecraft.displayGuiScreen(). If you also want a container (i.e. you want the block to hold items), you would also need a tile entity to store the items and a container to interact with it.

  • Quote

Share this post


Link to post
Share on other sites

peanutexexe    0

peanutexexe

peanutexexe    0

  • Tree Puncher
  • peanutexexe
  • Members
  • 0
  • 5 posts
Posted October 29, 2020 (edited)

My computer power line is has my mom

 

But I remember block code 
 

# = tab

 

package •••;

 

import •••;

 

public class RegistryHandler {
 

#public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, •••.MOD_ID)

 

#public static void init() {

##ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus());

#}
 

#public static final RegistryObject<Block> crucible = BLOCKS.registry(

##”crucible”, () -> new Block(

###Block.Properties

####.create(Material.Iron)

####.

hardnessAndResistance(5.0f, 6.0f)
+                           .sound(SoundType.STONE)
+                           .harvestLevel(1)
+                           .harvestTool(ToolType.PICKAXE)

 
 

 

here 

 

It's a cell phone that posts comments.

 

 

sorry

 

um... forge 1.16.3 is [(“ItemName”, ItemName::new)] is starting error

Edited October 29, 2020 by peanutexexe
  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2406

Draco18s

Draco18s    2406

  • Reality Controller
  • Draco18s
  • Members
  • 2406
  • 15933 posts
Posted October 29, 2020

Sounds like you want a block that is a container of some kind (like the furnace).

You might be best served by looking at a working example:

https://github.com/TheGreyGhost/MinecraftByExample/tree/1-15-2-final/src/main/java/minecraftbyexample/mbe31_inventory_furnace

 

There's a lot of moving parts to get what you want and trying to explain through machine translation will be difficult.

  • Quote

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Share this post


Link to post
Share on other sites

timko    0

timko

timko    0

  • Tree Puncher
  • timko
  • Members
  • 0
  • 1 post
Posted October 29, 2020

also 

6 hours ago, Draco18s said:

Sounds like you want a block that is a container of some kind (like the furnace).

You might be best served by looking at a working example:

https://github.com/TheGreyGhost/MinecraftByExample/tree/1-15-2-final/src/main/java/minecraftbyexample/mbe31_inventory_furnace

 

There's a lot of moving parts to get what you want and trying to explain through machine translation will be difficult.

also 1.15.2 has old methods and you need some methods to decode the method names

  • Quote

Share this post


Link to post
Share on other sites

peanutexexe    0

peanutexexe

peanutexexe    0

  • Tree Puncher
  • peanutexexe
  • Members
  • 0
  • 5 posts
Posted October 30, 2020 (edited)

Yes 1.15.2 has old and 1.16.3 is error

but I want not basic gui on crafting table or ...

Edited October 30, 2020 by peanutexexe
  • Quote

Share this post


Link to post
Share on other sites

peanutexexe    0

peanutexexe

peanutexexe    0

  • Tree Puncher
  • peanutexexe
  • Members
  • 0
  • 5 posts
Posted November 13, 2020
On 2020. 10. 29. at 오후 11시 21분, Draco18s said:

용광로와 같은 일종의 용기 인 블록을 원하는 것 같습니다.

작동하는 예를 살펴보면 가장 좋은 결과를 얻을 수 있습니다.

https://github.com/TheGreyGhost/MinecraftByExample/tree/1-15-2-final/src/main/java/minecraftbyexample/mbe31_inventory_furnace

 

원하는 것을 얻기 위해 움직이는 부분이 많고 기계 번역을 통해 설명하려고 노력하는 것은 어려울 것입니다.

 

Thank you is very good github file

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • __dwagon
      Forge keeps crashing

      By __dwagon · Posted 46 minutes ago

      Hey im back with information that not only 1.8.9 is crashing but also 1.16 as well. I don't know what to do I have redownoaded minecraft, forge, and java multiple times and nothing seems to work. Please help
    • piglinplayz
      is there a malisis door mod for 1.16.3 or grage door mod for 1.16.3

      By piglinplayz · Posted 1 hour ago

      i can find the it ij just says no 1.12.2 no 1.16.3
    • loordgek
      is there a malisis door mod for 1.16.3 or grage door mod for 1.16.3

      By loordgek · Posted 1 hour ago

      no search for your self it is not hard
    • piglinplayz
      is there a malisis door mod for 1.16.3 or grage door mod for 1.16.3

      By piglinplayz · Posted 1 hour ago

      or may i have the link?????????????????????????????????????????????????? Plz i need a respond ASAP because i need it for a moded smp 
    • Silivek
      is there a malisis door mod for 1.16.3 or grage door mod for 1.16.3

      By Silivek · Posted 1 hour ago

      Macaw's Doors may have one and there is a mod called Little Tiles that you can create one in.
  • Topics

    • __dwagon
      0
      Forge keeps crashing

      By __dwagon
      Started 46 minutes ago

    • piglinplayz
      7
      is there a malisis door mod for 1.16.3 or grage door mod for 1.16.3

      By piglinplayz
      Started 2 hours ago

    • piglinplayz
      9
      How do update a 1.12.2 mod to 1.16.3

      By piglinplayz
      Started 2 hours ago

    • BeastGamerYo
      1
      Urgent Help Forge Is Crashing!!!

      By BeastGamerYo
      Started 2 hours ago

    • __dwagon
      1
      1.8.9 keeps crashing

      By __dwagon
      Started 3 hours ago

  • Who's Online (See full list)

    • Ronshark
    • Caffeinated Pinkie
    • Choonster
    • CookieLukas
    • Honestgamer
    • st4s1k
    • Asleep365
    • zOnlyKroks
    • Luis_ST
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.16.3] how to make block click to open custom gui?
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community