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

[1.8] Substitution Alias Not Working


Recommended Posts



Basically, I want to replace snow and ice so they do not melt, and use the substitution alias system to avoid using ASM.


I have replaced the ItemBlock and Block here: https://gist.github.com/hsyyid/ae6e14b6128f5aee27d8 but to no avail.


Instead of replacing the snow and the ice, it appears that the ItemBlock does nothing when right clicked, and the snow and ice items DO NOT have textures anymore.


Any and all help would be greatly appreciated!  :D

Link to comment
Share on other sites

Okay. Well anyway you have to resort to standard debugging. Are you sure the method is being called? Use a console statement to confirm it.


After that, in the pre-init I think your registry of your blocks and items is wrong -- I don't think you can (or at least I think it is a bad idea) to set the unlocalized name to "minecraft:snow". The "minecraft:" is for vanilla items and it should really have your mod id.


After that, are you sure that the instances you are passing have in fact already been constructed (not null). Again use console statement to confirm it.


That's the only things I can think of, otherwise it looks pretty simple.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

  • 2 weeks later...

I just re-implemented, or at least attempted to, a block substitution into my mod.


The substitution alias does appear to be currently broken.


You can't place the block because ItemBlock.placeBlockAt eventually gets to ExtendedBlockStorage.get(int x, int y, int z) and it always returns air. It does that because Block.BLOCK_STATE_IDS.getByValue(#) always returns null.


Up until that point it appears to be working.



Here is a quick test mod if anyone wants to look into it.

With the exception of function names and imports changing, this is the same code works in 1.7


package net.minecraftforge.debug;

import net.minecraft.block.Block;
import net.minecraft.block.BlockTallGrass;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemColored;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.registry.ExistingSubstitutionException;
import net.minecraftforge.fml.common.registry.GameRegistry;

@Mod(modid = "substitutionaliastest")
public class SubstitutionAliasTest
    private Block testBlock;

    public void onPreInit(FMLPreInitializationEvent event)
        this.testBlock = new TestBlock();
        ItemBlock testItemBlock = (new ItemColored(this.testBlock, true)).setSubtypeNames(new String[] { "shrub", "grass", "fern" });

        try {
            GameRegistry.addSubstitutionAlias("minecraft:tallgrass", GameRegistry.Type.BLOCK, this.testBlock);
            GameRegistry.addSubstitutionAlias("minecraft:tallgrass", GameRegistry.Type.ITEM, testItemBlock);
        } catch (ExistingSubstitutionException e) {

    public static class TestBlock extends BlockTallGrass
        public TestBlock()

Link to comment
Share on other sites

it is working, cpws tested it fully. Not sure what the hell you're talking about when it comes to setting the block as you should be able to do that just fine.

BLOCK_STATE_IDS will return proper values for the current world respecting aliases.


I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Patreon: http://www.patreon.com/lexmanos
Paypal: http://paypal.me/LexManos

BitCoin: 1Q8rWvUNMM2T1ZfDaFeeYQyVXtYoeT6tTn

Link to comment
Share on other sites

Well I've tried that test mod I posted again.


I've tried registering the alias in PreInit, Init, and PostInit.

Every time it the same result.


The block is replaced, the F3 screen shows


type: tall_grass


before replacement it shows:


type: tall_grass



The original item in the creative menu has no texture and can not be placed due to failing Block.BLOCK_STATE_IDS.getByValue(#)


If you use pick block, you get an item with correct texture but placing it crashes the game.

java.lang.ArrayIndexOutOfBoundsException: -1

at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:151)

at net.minecraft.client.multiplayer.PlayerControllerMP.func_178890_a(PlayerControllerMP.java:442)


ItemStack.java:151 => playerIn.triggerAchievement(StatList.objectUseStats[item.getIdFromItem(this.item)]);

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

    • What on earth... Did you put all those entries there? This file should usually be empty. Are you using any antivirus software? If so: Which? Do you have any Minecraft-related software installed (third party launchers)? If so: Which?
    • I can't dm, so i'll attach it here  # Copyright (c) 1993-2009 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # #     rhino.acme.com          # source server #     x.acme.com              # x client host # localhost name resolution is handled within DNS itself. #       localhost #    ::1             localhost    codeload.github.com    support.kaspersky.ru    kaspersky.ru    virusinfo.info    forum.kasperskyclub.ru    cyberforum.ru    soft-file.ru    www.360totalsecurity.com    cezurity.com    www.dropbox.com    spec-komp.com    eset.ua    panel.koronavirusfuck.xyz    360totalsecurity.com    www.esetnod32.ru    www.comss.ru    blog-pc.ru    www.securrity.ru    vellisa.ru    download-software.ru    drweb-cureit.ru    softpacket.ru    www.kaspersky.com    www.avast.ua    www.avast.ru    zillya.ua    safezone.ua    vms.drweb.ru    www.drweb.ua    free.drweb.ru    biblprog.org.ua    free-software.com.ua    free.dataprotection.com.ua    www.drweb.com    www.softportal.com    www.nashnet.ua    softlist.com.ua    it-doc.info    esetnod32.ru    blog-bridge.ru    remontka.pro    securos.org.ua    pc-helpp.com    softdroid.net    malwarebytes.com    ru.vessoft.com    AlpineFile.ru    malwarebytes-anti-malware.ru.uptodown.com    ProgramDownloadFree.com    download.cnet.com    soft.mydiv.net    spyware-ru.com    remontcompa.ru    www.hitmanpro.com    hitman-pro.ru.uptodown.com    www.bleepingcomputer.com    soft.oszone.net    krutor.org    RuTracker.org    www.greatis.com    unhackme.ru.uptodown.com    programy.com.ua    softobase.com    www.besplatnoprogrammy.ru    unhackme.en.softonic.com    unhackme.com    unhackme.ru    nnm-club.name    vgrom.com    moneropool.com    mine.moneropool.com    xmr.cryptopool.org    pool.monero.org    minexmr.com    monero.crypto-pool.fr    dwarfpool.com    disk-space.ru    file7.ru    ufille.ru    rgho.st    yadi.su    catcut.net    fsdisk.ru    rpfile.ru    cheats.file-a.ru    file-space.org    sfailo.ru    sendspace.com    www.sendspace.com    fille-7.ru    loufile.ru    file-seven.com    file-a.ru    fail-7.ru    1-kk.ru    rufile.net    filexpwx.space    sfile.net    mdiskfile.com    mega.nz    dfile.su    rgfail.ru    rudwnl.ru    dfile.info    flles.ru    pool.minexmr.to    ska4ay.pl    ska4ay.ru    ska4ay.club    ska4ay.net    ska4ay.org    ska4ay.com    ska4ay.pro    ska4ay.pw    ska4ay.online    skachaty.pl    skachaty.ru    skachaty.club    skachaty.net    skachaty.org    skachaty.com    skachaty.pro    skachaty.pw    skachaty.online    skachay.pl    skachay.ru    skachay.club    skachay.net    skachay.org    skachay.com    skachay.pro    skachay.pw    skachay.website    skachay.online    ska4aty.pl    ska4aty.ru    ska4aty.club    ska4aty.net    ska4aty.org    ska4aty.com    ska4aty.pro    ska4aty.pw    ska4aty.online authserver.mojang.com sessionserver.mojang.com launchermeta.mojang.com    
    • You don't need to worry about this anymore, Forge has fixed this in the installer.
  • Topics

  • Who's Online (See full list)

  • Create New...

Important Information

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