Thrones - Clean item names

Used to have ".bottom" in them due to being auto-registered.
This commit is contained in:
Emmanuel BENOîT 2016-07-05 16:01:52 +02:00
parent ba3de96d04
commit 9edf2c80fc
2 changed files with 10 additions and 7 deletions

View file

@ -2,6 +2,8 @@ package mmm.deco;
import mmm.utils.URegistry;
import net.minecraft.item.Item;
import net.minecraft.item.ItemCloth;
@ -10,12 +12,16 @@ public class DThrone
public final DThroneBlock TOP;
public final DThroneBlock BOTTOM;
public final Item ITEM;
public DThrone( E_DWoodType woodType )
public DThrone( final E_DWoodType woodType )
{
URegistry.addBlock( this.BOTTOM = new DThroneBlock( this , woodType , false ) );
URegistry.addBlock( this.BOTTOM = new DThroneBlock( this , woodType , false ) , null );
URegistry.addBlock( this.TOP = new DThroneBlock( this , woodType , true ) , null );
this.ITEM = new ItemCloth( this.BOTTOM );
URegistry.setIdentifiers( this.ITEM , "deco" , "throne" , woodType.suffix );
URegistry.addItem( this.ITEM );
}
}

View file

@ -238,7 +238,7 @@ public class DThroneBlock
public Item getItemDropped( IBlockState state , Random rand , int fortune )
{
return Item.getItemFromBlock( this.parts.BOTTOM );
return this.parts.ITEM;
}
@ -246,10 +246,7 @@ public class DThroneBlock
public ItemStack getPickBlock( final IBlockState state , final RayTraceResult target , final World world ,
final BlockPos pos , final EntityPlayer player )
{
final Item item = Item.getItemFromBlock( this.parts.BOTTOM );
return item == null
? null
: new ItemStack( item , 1 , this.damageDropped( state.getActualState( world , pos ) ) );
return new ItemStack( this.parts.ITEM , 1 , this.damageDropped( state.getActualState( world , pos ) ) );
}