Unlink banner block and item id. Mojang should of matched these up but they didn't -.-

This commit is contained in:
Lex Manos 2014-12-01 18:00:28 -08:00
parent 4a92959cc1
commit 7b2e7ac3c9
4 changed files with 6 additions and 4 deletions

View file

@ -133,7 +133,7 @@
"name": "com.mojang:authlib:1.5.17"
},
{
"name": "com.mojang:realms:1.5.5"
"name": "com.mojang:realms:1.6.1"
},
{
"name": "org.apache.commons:commons-compress:1.8.1"

View file

@ -62,7 +62,7 @@
"name": "com.mojang:authlib:1.5.17"
},
{
"name": "com.mojang:realms:1.5.5"
"name": "com.mojang:realms:1.6.1"
},
{
"name": "org.apache.commons:commons-compress:1.8.1"

View file

@ -11,6 +11,7 @@ import java.util.Set;
import org.apache.commons.lang3.Validate;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBanner;
import net.minecraft.item.ItemBlock;
import net.minecraft.util.ObjectIntIdentityMap;
import net.minecraft.util.RegistryNamespaced;
@ -77,7 +78,7 @@ public class FMLControlledNamespacedRegistry<I> extends RegistryNamespacedDefaul
// entry is blocked, thus should be empty
if (blockedIds.contains(id)) throw new IllegalStateException(String.format("Registry entry for %s %s, id %d, name %s, marked as dangling.", type, obj, id, name));
if (obj instanceof ItemBlock)
if (obj instanceof ItemBlock && !(obj instanceof ItemBanner)) //Dammet Mojang not linking Banners
{
Block block = ((ItemBlock) obj).block;

View file

@ -28,6 +28,7 @@ import java.util.Set;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBanner;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ObjectIntIdentityMap;
@ -709,7 +710,7 @@ public class GameData {
private int registerItem(Item item, String name, int idHint)
{
if (item instanceof ItemBlock) // ItemBlock, adjust id and clear the slot already occupied by the corresponding block
if (item instanceof ItemBlock && !(item instanceof ItemBanner)) // ItemBlock, adjust id and clear the slot already occupied by the corresponding block
{
Block block = ((ItemBlock) item).block;
if (idHint != -1 && getMain().blockSubstitutions.containsKey(name))