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    57

vemerion

vemerion    57

  • Creeper Killer
  • vemerion
  • Members
  • 57
  • 222 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    2414

Draco18s

Draco18s    2414

  • Reality Controller
  • Draco18s
  • Members
  • 2414
  • 15998 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

    • Beethoven92
      Error at load_registries event phase

      By Beethoven92 · Posted 6 minutes ago

      Apparently here: BlockList.tutorial_slab = new SlabBlock(Block.Properties.from(BlockList.tutorial_slab)).setRegistryName(location("tutorial_slab")) your BlockList.tutorial_slab block is null when the block registration event is fired..i suggest you use deferred register to manage your registry entries
    • BeardlessBrady
      [1.16.4] Tile Registration

      By BeardlessBrady · Posted 12 minutes ago

      Ah there ya go! Thanks.
    • Beethoven92
      [1.16.4] Tile Registration

      By Beethoven92 · Posted 15 minutes ago

      public VendingTile(TileEntityType<?> tileEntityTypeIn) You don't need an argument in the constructor of your tile entity as in this case is not used since you are passing the TileEntityType to the super class: super(CommonRegistry.TILE_VENDING.get());  
    • BeardlessBrady
      [1.16.4] Tile Registration

      By BeardlessBrady · Posted 25 minutes ago

      Hello, I am having issues registering my tile entity. Here is my code as well as a link to the code in my github. The IDE is complaining that 'TileEntityType.Builder.create' has invalid arguments   // Tiles public static final DeferredRegister<TileEntityType<?>> TILE_ENTITY_TYPES = DeferredRegister.create(ForgeRegistries.TILE_ENTITIES, GOCurrency.MODID); public static final RegistryObject<TileEntityType<VendingTile>> TILE_VENDING = TILE_ENTITY_TYPES.register("vending_te", () -> TileEntityType.Builder.create(VendingTile::new, BLOCK_VENDING.get()).build(null));   https://github.com/Beardlessbrady/Currency-Mod/blob/95230ca4ee2d290b3e5f3ef81810a27f73137625/src/main/java/com/beardlessbrady/gocurrency/handlers/CommonRegistry.java#L42-L43
    • ThisIsNotOriginal
      Error at load_registries event phase

      By ThisIsNotOriginal · Posted 1 hour ago

      The pastebin for the log and Registry Event is posted below this text.   https://pastebin.com/KEzJvRgG https://pastebin.com/VUrXR94k
  • Topics

    • ThisIsNotOriginal
      1
      Error at load_registries event phase

      By ThisIsNotOriginal
      Started 1 hour ago

    • BeardlessBrady
      2
      [1.16.4] Tile Registration

      By BeardlessBrady
      Started 26 minutes ago

    • PlasmaPig13
      1
      The game crashed whilst rendering overlay Error: java.lang.NullPointerException: Rendering overlay Exit Code: -1

      By PlasmaPig13
      Started 1 hour ago

    • EnderiumSmith
      3
      The vanilla tag system isnt suitable for ore dictionary

      By EnderiumSmith
      Started 15 hours ago

    • Ilikecheese
      0
      forge 1.16.5 wont show up

      By Ilikecheese
      Started 1 hour ago

  • Who's Online (See full list)

    • Microcellule
    • Milk_Shak3s
    • Beethoven92
    • AstroTurffx
    • Jeldrik
    • Azurelmao
    • ichttt
    • Deadlocked47
    • BeardlessBrady
    • ThisIsNotOriginal
    • ehbean
    • That_Tallone
    • squidlex
  • 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