mirror of
https://github.com/GTNewHorizons/Avaritia.git
synced 2026-11-22 13:10:00 +00:00
1 parent
e5108f8d44
commit
58ff2ac6d2
4 files changed
+33
-6
No files matched your search
@@ -205,6 +205,8 @@ public class LudicrousEvents {
|
||||
public void onAttacked(LivingAttackEvent event) {
|
||||
if(!(event.entityLiving instanceof EntityPlayer))
|
||||
return;
|
||||
if(event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer)
|
||||
return;
|
||||
EntityPlayer player = (EntityPlayer)event.entityLiving;
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() == LudicrousItems.infinity_sword && player.isUsingItem())
|
||||
event.setCanceled(true);
|
||||
@@ -266,12 +268,23 @@ public class LudicrousEvents {
|
||||
public void canHarvest(PlayerEvent.HarvestCheck event){
|
||||
if(event.entityPlayer.getHeldItem() != null){
|
||||
ItemStack held = event.entityPlayer.getHeldItem();
|
||||
if(held.getItem() == LudicrousItems.infinity_shovel){
|
||||
event.success = true;
|
||||
if(held.getItem() == LudicrousItems.infinity_shovel && event.block.getMaterial() == Material.rock){
|
||||
if(held.getTagCompound().getBoolean("destroyer") && isGarbageBlock(event.block))
|
||||
event.success = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isGarbageBlock(Block block) {
|
||||
for(int id : OreDictionary.getOreIDs(new ItemStack(block, 1))) {
|
||||
String ore = OreDictionary.getOreName(id);
|
||||
if(ore.equals("cobblestone") || ore.equals("stone") || ore.equals("netherrack"))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onDeath(LivingDeathEvent event){
|
||||
if(event.entityLiving instanceof EntityPlayer){
|
||||
|
||||
@@ -119,7 +119,7 @@ public class Grinder {
|
||||
'X', new ItemStack(LudicrousBlocks.resource_block, 1, 1),
|
||||
'N', new ItemStack(LudicrousItems.resource, 1, 4));
|
||||
|
||||
/*ExtremeCraftingManager.getInstance().addRecipe(new ItemStack(LudicrousItems.infinity_axe),
|
||||
ExtremeCraftingManager.getInstance().addRecipe(new ItemStack(LudicrousItems.infinity_axe),
|
||||
" I ",
|
||||
"IIIII",
|
||||
"IIII ",
|
||||
@@ -130,7 +130,21 @@ public class Grinder {
|
||||
" N ",
|
||||
" N ",
|
||||
'I', new ItemStack(LudicrousItems.resource, 1, 6),
|
||||
'N', new ItemStack(LudicrousItems.resource, 1, 4));*/
|
||||
'N', new ItemStack(LudicrousItems.resource, 1, 4));
|
||||
|
||||
ExtremeCraftingManager.getInstance().addRecipe(new ItemStack(LudicrousItems.infinity_bow),
|
||||
" II",
|
||||
" I W",
|
||||
" I W",
|
||||
"I W",
|
||||
"X W",
|
||||
"I W",
|
||||
" I W",
|
||||
" I W",
|
||||
" II",
|
||||
'I', new ItemStack(LudicrousItems.resource, 1, 6),
|
||||
'X', new ItemStack(LudicrousBlocks.crystal_matrix, 1),
|
||||
'W', new ItemStack(Blocks.wool, 1, 0));
|
||||
|
||||
ExtremeCraftingManager.getInstance().addRecipe(new ItemStack(LudicrousItems.infinity_armor),
|
||||
" NN NN ",
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ItemShovelInfinity extends ItemSpade {
|
||||
{
|
||||
return efficiencyOnProperMaterial;
|
||||
}
|
||||
return Math.max(func_150893_a(stack, block), 6.0F);
|
||||
return Math.max(func_150893_a(stack, block), 1.0F);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
Reference in new issue
Block a user