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

Why blockitems disappear from creative menu, if i override a block?


Recommended Posts

Surprise! Items in your inventory that are blocks are still Items. You didn't override the item, just the block, so the BlockItem instance is invalid and points at air.

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.

Link to comment
Share on other sites

I know, that they are items there.


How do i fix this?


Animefan8888 sayd in the other thread, that there is no need to override the blockitems too...

With a give-command i get working blockitems.


Just, if i try to place the wall-type of the redstone-torch, a weird bug-block with name "air" and red particles appears.


And i wonder why torches and heads are coded as two blocks, one for wall and one for ground?

What about just choosing a model by blockstate-json?

Edited by Drachenbauer
Link to comment
Share on other sites

About the blockitems:


I think, he just meaned, i don´ have to create blockitems with custom registrynames, i have to override them like the blocks, giving them the existing vanilla registrynames.


Now they appear in the creative inventory and i can place redstone torches successfully at walls, too.

Edited by Drachenbauer
Link to comment
Share on other sites

4 hours ago, Drachenbauer said:

Now they appear in the creative inventory and i can place redstone torches successfully at walls, too.

Technically you don't have to register an Item at all. You just need to update the Item.BLOCK_TO_ITEM mapping. Like so

Item.BLOCK_TO_ITEM.put(myOverridenBlock, Items.ITEM_I_WANT);



I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.


  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • Hello, I have purchased a server yesterday, and I am currently experimenting with mods. i plan on playing with bigger mods in the future, but i am testing with Simple Voice Chat. I've set it up on my Minecraft Account, but setting it up on my server has been a struggle. Here is my console info. I need help!   17.01 21:39:57 [Multicraft] Received start command 17.01 21:39:57 [Multicraft] Loading server properties 17.01 21:39:57 [Multicraft] Starting server! 17.01 21:39:57 [Multicraft] Loaded config for "Custom.jar (Upload and use your own JAR)" 17.01 21:39:57 [Multicraft] Updating eula.txt file 17.01 21:39:58 [Server] INFO 2022-01-17 21:39:58,032 main WARN Advanced terminal features are not available in this environment 17.01 21:39:58 [Server] main/INFO [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 36.2.23, --fml.mcpVersion, 20210115.111550, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge, nogui] 17.01 21:39:58 [Server] main/INFO [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 8.0.9+86+master.3cf110c starting: java version 1.8.0_312 by Private Build 17.01 21:39:58 [Server] main/INFO [ne.mi.fm.lo.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust 17.01 21:39:58 [Server] main/INFO [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.4 Source=file:/libraries/org/spongepowered/mixin/0.8.4/mixin-0.8.4.jar Service=ModLauncher Env=SERVER 17.01 21:39:59 [Server] main/INFO [cp.mo.mo.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmlserver' with arguments [--gameDir, ., nogui] 17.01 21:40:06 [Server] modloading-worker-43/INFO [ne.mi.co.ForgeMod/FORGEMOD]: Forge mod loading, version 36.2.23, for MC 1.16.5 with MCP 20210115.111550 17.01 21:40:06 [Server] modloading-worker-43/INFO MinecraftForge v36.2.23 Initialized 17.01 21:40:06 [Server] Forge Version Check/INFO [ne.mi.fm.VersionChecker/]: [voicechat] Starting version check at https://maxhenkel.de/update/voicechat.json 17.01 21:40:08 [Server] Forge Version Check/INFO [ne.mi.fm.VersionChecker/]: [voicechat] Found status: UP_TO_DATE Current: 1.16.5-1.7.8 Target: null 17.01 21:40:08 [Server] Forge Version Check/INFO [ne.mi.fm.VersionChecker/]: [forge] Starting version check at https://files.minecraftforge.net/net/minecraftforge/forge/promotions_slim.json 17.01 21:40:08 [Server] main/INFO [mojang/YggdrasilAuthenticationService]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' 17.01 21:40:08 [Server] Forge Version Check/INFO [ne.mi.fm.VersionChecker/]: [forge] Found status: AHEAD Current: 36.2.23 Target: null 17.01 21:40:08 [Server] main/WARN Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498] 17.01 21:40:08 [Server] main/WARN Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0] 17.01 21:40:08 [Server] main/WARN Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0] 17.01 21:40:08 [Server] main/WARN Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498] 17.01 21:40:08 [Server] main/WARN Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0] 17.01 21:40:08 [Server] main/INFO Reloading ResourceManager: Default, bukkit, forge-1.16.5-36.2.23-universal.jar, voicechat-forge-1.16.5-1.7.8.jar 17.01 21:40:09 [Server] Worker-Main-10/INFO Loaded 7 recipes 17.01 21:40:10 [Server] Worker-Main-10/INFO Loaded 927 advancements 17.01 21:40:11 [Server] Server thread/INFO Starting minecraft server version 1.16.5 17.01 21:40:11 [Server] Server thread/INFO Loading properties 17.01 21:40:11 [Server] Server thread/INFO Default game type: SURVIVAL 17.01 21:40:11 [Server] Server thread/INFO Generating keypair 17.01 21:40:12 [Server] Server thread/INFO Starting Minecraft server on 17.01 21:40:12 [Server] Server thread/INFO Using epoll channel type 17.01 21:40:12 [Server] Server thread/ERROR Encountered an unexpected exception 17.01 21:40:12 [Server] INFO net.minecraftforge.fml.config.ConfigFileTypeHandler$ConfigLoadingException: Failed loading config file voicechat-server.toml of type SERVER for modid voicechat 17.01 21:40:12 [Server] INFO at net.minecraftforge.fml.config.ConfigFileTypeHandler.lambda$reader$1(ConfigFileTypeHandler.java:61) ~[forge:?] {re:classloading} 17.01 21:40:12 [Server] INFO at net.minecraftforge.fml.config.ConfigTracker.openConfig(ConfigTracker.java:104) ~[forge:?] {re:classloading} 17.01 21:40:12 [Server] INFO at net.minecraftforge.fml.config.ConfigTracker.lambda$loadConfigs$1(ConfigTracker.java:83) ~[forge:?] {re:classloading} 17.01 21:40:12 [Server] INFO at java.lang.Iterable.forEach(Iterable.java:75) ~[?:1.8.0_312] {} 17.01 21:40:12 [Server] INFO at java.util.Collections$SynchronizedCollection.forEach(Collections.java:2064) ~[?:1.8.0_312] {} 17.01 21:40:12 [Server] INFO at net.minecraftforge.fml.config.ConfigTracker.loadConfigs(ConfigTracker.java:83) ~[forge:?] {re:classloading} 17.01 21:40:12 [Server] INFO at net.minecraftforge.fml.server.ServerLifecycleHooks.handleServerAboutToStart(ServerLifecycleHooks.java:94) ~[forge:?] {re:classloading} 17.01 21:40:12 [Server] INFO at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:166) ~[?:?] {re:classloading,pl:accesstransformer:B} 17.01 21:40:12 [Server] INFO at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:621) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} 17.01 21:40:12 [Server] INFO at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:232) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} 17.01 21:40:12 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312] {} 17.01 21:40:12 [Server] INFO Caused by: com.electronwill.nightconfig.core.io.ParsingException: Invalid character '2' after table entry "[port]" = 2 17.01 21:40:12 [Server] INFO at com.electronwill.nightconfig.toml.TableParser.parseNormal(TableParser.java:69) ~[toml-3.6.3.jar:?] {} 17.01 21:40:12 [Server] INFO at com.electronwill.nightconfig.toml.TableParser.parseNormal(TableParser.java:101) ~[toml-3.6.3.jar:?] {} 17.01 21:40:12 [Server] INFO at com.electronwill.nightconfig.toml.TomlParser.parse(TomlParser.java:88) ~[toml-3.6.3.jar:?] {} 17.01 21:40:12 [Server] INFO at com.electronwill.nightconfig.toml.TomlParser.parse(TomlParser.java:37) ~[toml-3.6.3.jar:?] {} 17.01 21:40:12 [Server] INFO at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:113) ~[core-3.6.3.jar:?] {} 17.01 21:40:12 [Server] INFO at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:219) ~[core-3.6.3.jar:?] {} 17.01 21:40:12 [Server] INFO at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:202) ~[core-3.6.3.jar:?] {} 17.01 21:40:12 [Server] INFO at com.electronwill.nightconfig.core.file.WriteSyncFileConfig.load(WriteSyncFileConfig.java:73) ~[core-3.6.3.jar:?] {} 17.01 21:40:12 [Server] INFO at com.electronwill.nightconfig.core.file.AutosaveCommentedFileConfig.load(AutosaveCommentedFileConfig.java:85) ~[core-3.6.3.jar:?] {} 17.01 21:40:12 [Server] INFO at net.minecraftforge.fml.config.ConfigFileTypeHandler.lambda$reader$1(ConfigFileTypeHandler.java:57) ~[forge:?] {re:classloading} 17.01 21:40:12 [Multicraft] Server shut down (starting) 17.01 21:40:12 [Multicraft] Not restarting crashed server. 17.01 21:40:12 [Multicraft] Server stopped
    • I would like to figure out a solution to essentially disable all loaded redstone blocks/entities from "ticking" - but unsure if this is possible or what criteria/objects can be used to accomplish this. The blockEntityList on the ServerWorld object has all of the loaded entities, but redstone blocks are not considered "tickable" and are not found in the tickableTileEntities list and also do not seem to have any unique criteria to filter. I.E. to find all tickableTileEntities in blockEntityList, I can search it for any objects that are an instance of ITickableTileEntity -- but the same cannot be done for redstone blocks.  I have code that simulates disabling tile entity ticks by removing the objects from the tickableTileEntity list and then restoring them later from the blockEntityList. I'd like to do something similar with redstone blocks if possible, but so far I cannot find any solutions.  Sample code for tile entities below minecraftServer.overworld().tickableBlockEntities.clear(); minecraftServer.overworld().tickableBlockEntities.addAll(minecraftServer.overworld().blockEntityList.stream().filter(x -> x instanceof ITickableTileEntity).collect(Collectors.toSet()));
    • Thanks for your answer!  I'll create a backup and give it a try.  Fortunately if I do mess it up, it's only a week's progress lost. 
  • Topics

  • Who's Online (See full list)

  • Create New...

Important Information

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