Removed old rendering system
Removed old rendering system. Some parts may be left over, but they won't affect testing. 1.10-R todo tag marks things to do with rendering.
This commit is contained in:
@@ -66,10 +66,6 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
|
||||
public static final int FLUIX = SINGLE_OFFSET * 2;
|
||||
public static final int FINAL_STAGE = SINGLE_OFFSET * 3;
|
||||
|
||||
private final ModelResourceLocation[] certus = new ModelResourceLocation[3];
|
||||
private final ModelResourceLocation[] fluix = new ModelResourceLocation[3];
|
||||
private final ModelResourceLocation[] nether = new ModelResourceLocation[3];
|
||||
|
||||
public ItemCrystalSeed()
|
||||
{
|
||||
this.setHasSubtypes( true );
|
||||
@@ -78,70 +74,6 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
|
||||
EntityRegistry.registerModEntity( EntityGrowingCrystal.class, EntityGrowingCrystal.class.getSimpleName(), EntityIds.get( EntityGrowingCrystal.class ), AppEng.instance(), 16, 4, true );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void registerIcons( final ClientHelper ir, final String name )
|
||||
{
|
||||
final String preFix = name + ".";
|
||||
|
||||
this.certus[0] = ir.setIcon( this, preFix + "Certus" );
|
||||
this.certus[1] = ir.setIcon( this, preFix + "Certus2" );
|
||||
this.certus[2] = ir.setIcon( this, preFix + "Certus3" );
|
||||
|
||||
this.nether[0] = ir.setIcon( this, preFix + "Nether" );
|
||||
this.nether[1] = ir.setIcon( this, preFix + "Nether2" );
|
||||
this.nether[2] = ir.setIcon( this, preFix + "Nether3" );
|
||||
|
||||
this.fluix[0] = ir.setIcon( this, preFix + "Fluix" );
|
||||
this.fluix[1] = ir.setIcon( this, preFix + "Fluix2" );
|
||||
this.fluix[2] = ir.setIcon( this, preFix + "Fluix3" );
|
||||
|
||||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register( this, new ItemMeshDefinition(){
|
||||
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation( final ItemStack stack )
|
||||
{
|
||||
ModelResourceLocation[] list = null;
|
||||
|
||||
int damage = ItemCrystalSeed.this.getProgress( stack );
|
||||
|
||||
if( damage < CERTUS + SINGLE_OFFSET )
|
||||
{
|
||||
list = ItemCrystalSeed.this.certus;
|
||||
}
|
||||
else if( damage < NETHER + SINGLE_OFFSET )
|
||||
{
|
||||
damage -= NETHER;
|
||||
list = ItemCrystalSeed.this.nether;
|
||||
}
|
||||
|
||||
else if( damage < FLUIX + SINGLE_OFFSET )
|
||||
{
|
||||
damage -= FLUIX;
|
||||
list = ItemCrystalSeed.this.fluix;
|
||||
}
|
||||
|
||||
if( list == null )
|
||||
{
|
||||
return new ModelResourceLocation( "diamond" );
|
||||
}
|
||||
|
||||
if( damage < LEVEL_OFFSET )
|
||||
{
|
||||
return list[0];
|
||||
}
|
||||
else if( damage < LEVEL_OFFSET * 2 )
|
||||
{
|
||||
return list[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
return list[2];
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static ResolverResult getResolver( final int certus2 )
|
||||
{
|
||||
|
||||
@@ -58,51 +58,12 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
|
||||
// rather simple client side caching.
|
||||
private static final Map<ItemStack, ItemStack> SIMPLE_CACHE = new WeakHashMap<ItemStack, ItemStack>();
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
private ModelResourceLocation res;
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
private ModelResourceLocation encodedPatternModel; // TODO: make encoded pattern model!
|
||||
|
||||
public ItemEncodedPattern()
|
||||
{
|
||||
this.setFeature( EnumSet.of( AEFeature.Patterns ) );
|
||||
this.setMaxStackSize( 1 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons( final ClientHelper proxy, final String name )
|
||||
{
|
||||
this.encodedPatternModel = this.res = proxy.setIcon( this, name );
|
||||
|
||||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register( this, new ItemMeshDefinition(){
|
||||
|
||||
boolean recursive = false;
|
||||
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation( final ItemStack stack )
|
||||
{
|
||||
if( this.recursive == false )
|
||||
{
|
||||
this.recursive = true;
|
||||
|
||||
final ItemEncodedPattern iep = (ItemEncodedPattern) stack.getItem();
|
||||
|
||||
final ItemStack is = iep.getOutput( stack );
|
||||
if( Minecraft.getMinecraft().thePlayer.isSneaking() )
|
||||
{
|
||||
return ItemEncodedPattern.this.encodedPatternModel;
|
||||
}
|
||||
|
||||
this.recursive = false;
|
||||
}
|
||||
|
||||
return ItemEncodedPattern.this.res;
|
||||
}
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick( final ItemStack stack, final World w, final EntityPlayer player, final EnumHand hand )
|
||||
{
|
||||
|
||||
@@ -55,28 +55,6 @@ public class ItemPaintBall extends AEBaseItem
|
||||
this.setHasSubtypes( true );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void registerIcons( final ClientHelper ir, final String name )
|
||||
{
|
||||
final ModelResourceLocation sloc = ir.setIcon( this, name + "Shimmer" );
|
||||
final ModelResourceLocation loc = ir.setIcon( this, name );
|
||||
|
||||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register( this, new ItemMeshDefinition(){
|
||||
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation( final ItemStack stack )
|
||||
{
|
||||
if( ItemPaintBall.this.isLumen( stack ) )
|
||||
{
|
||||
return sloc;
|
||||
}
|
||||
|
||||
return loc;
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName( final ItemStack is )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user