Added missing Block.damageDropped() to OreQuartzCharged
This was previously handled by a template method, but it was removed with the api refactoring. Fixes #1174
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
package appeng.block.solids;
|
package appeng.block.solids;
|
||||||
|
|
||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
@@ -38,13 +39,15 @@ import appeng.client.render.BaseBlockRender;
|
|||||||
import appeng.client.render.blocks.RenderQuartzOre;
|
import appeng.client.render.blocks.RenderQuartzOre;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
|
|
||||||
|
|
||||||
public class OreQuartz extends AEBaseBlock
|
public class OreQuartz extends AEBaseBlock
|
||||||
{
|
{
|
||||||
private int boostBrightnessLow;
|
private int boostBrightnessLow;
|
||||||
private int boostBrightnessHigh;
|
private int boostBrightnessHigh;
|
||||||
private boolean enhanceBrightness;
|
private boolean enhanceBrightness;
|
||||||
|
|
||||||
public OreQuartz(Class<? extends OreQuartz> self) {
|
public OreQuartz( Class<? extends OreQuartz> self )
|
||||||
|
{
|
||||||
super( self, Material.rock );
|
super( self, Material.rock );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
this.setHardness( 3.0F );
|
this.setHardness( 3.0F );
|
||||||
@@ -90,7 +93,8 @@ public class OreQuartz extends AEBaseBlock
|
|||||||
return j1;
|
return j1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OreQuartz() {
|
public OreQuartz()
|
||||||
|
{
|
||||||
this( OreQuartz.class );
|
this( OreQuartz.class );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,11 +18,14 @@
|
|||||||
|
|
||||||
package appeng.block.solids;
|
package appeng.block.solids;
|
||||||
|
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@@ -34,10 +37,12 @@ import appeng.client.render.effects.ChargedOreFX;
|
|||||||
import appeng.core.AEConfig;
|
import appeng.core.AEConfig;
|
||||||
import appeng.core.CommonHelper;
|
import appeng.core.CommonHelper;
|
||||||
|
|
||||||
|
|
||||||
public class OreQuartzCharged extends OreQuartz
|
public class OreQuartzCharged extends OreQuartz
|
||||||
{
|
{
|
||||||
|
|
||||||
public OreQuartzCharged() {
|
public OreQuartzCharged()
|
||||||
|
{
|
||||||
super( OreQuartzCharged.class );
|
super( OreQuartzCharged.class );
|
||||||
this.setBoostBrightnessLow( 2 );
|
this.setBoostBrightnessLow( 2 );
|
||||||
this.setBoostBrightnessHigh( 5 );
|
this.setBoostBrightnessHigh( 5 );
|
||||||
@@ -55,6 +60,17 @@ public class OreQuartzCharged extends OreQuartz
|
|||||||
throw new MissingDefinition( "Tried to access charged certus quartz crystal, even though they are disabled" );
|
throw new MissingDefinition( "Tried to access charged certus quartz crystal, even though they are disabled" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int damageDropped( int id )
|
||||||
|
{
|
||||||
|
for ( ItemStack crystalStack : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeStack( 1 ).asSet() )
|
||||||
|
{
|
||||||
|
return crystalStack.getItemDamage();
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new MissingDefinition( "Tried to access charged certus quartz crystal, even though they are disabled" );
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly( Side.CLIENT )
|
@SideOnly( Side.CLIENT )
|
||||||
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
||||||
|
|||||||
Reference in New Issue
Block a user