gonna rethink a couple things for this

This commit is contained in:
Ellpeck 2017-03-08 19:01:02 +01:00
parent d4598b3ff3
commit 18c04a07c0
6 changed files with 7 additions and 86 deletions

View file

@ -104,7 +104,6 @@ public final class BlockCrafting{
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockFluidPlacer), new ItemStack(InitBlocks.blockFluidPlacer))); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockFluidPlacer), new ItemStack(InitBlocks.blockFluidPlacer)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockFluidCollector), new ItemStack(InitBlocks.blockFluidCollector))); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockFluidCollector), new ItemStack(InitBlocks.blockFluidCollector)));
//Battery Box //Battery Box
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockBatteryBox), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockBatteryBox),
new ItemStack(InitBlocks.blockEnergizer), new ItemStack(InitBlocks.blockEnergizer),

View file

@ -11,13 +11,11 @@
package de.ellpeck.actuallyadditions.mod.crafting; package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.*; import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.*;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.Util;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.GameRegistry;
@ -56,11 +54,6 @@ public final class InitCrafting{
GameRegistry.addRecipe(new RecipeBioMash()); GameRegistry.addRecipe(new RecipeBioMash());
RecipeSorter.register(ModUtil.MOD_ID+":recipeBioMash", RecipeBioMash.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless"); RecipeSorter.register(ModUtil.MOD_ID+":recipeBioMash", RecipeBioMash.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless");
if(ActuallyAdditions.isCaveMode){
ActuallyAdditionsAPI.addCompostRecipe(new ItemStack(Blocks.LEAVES, 1, Util.WILDCARD), Blocks.LEAVES, new ItemStack(Blocks.DIRT), Blocks.DIRT);
ActuallyAdditionsAPI.addCompostRecipe(new ItemStack(Blocks.LEAVES2, 1, Util.WILDCARD), Blocks.LEAVES2, new ItemStack(Blocks.DIRT), Blocks.DIRT);
}
} }
} }

View file

@ -10,7 +10,6 @@
package de.ellpeck.actuallyadditions.mod.creative; package de.ellpeck.actuallyadditions.mod.creative;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.InitItems;
@ -149,10 +148,6 @@ public class CreativeTab extends CreativeTabs{
this.add(InitBlocks.blockBlackLotus); this.add(InitBlocks.blockBlackLotus);
if(ActuallyAdditions.isCaveMode){
this.add(InitItems.itemCrystalChisel);
}
this.add(InitItems.itemBag); this.add(InitItems.itemBag);
this.add(InitItems.itemVoidBag); this.add(InitItems.itemVoidBag);

View file

@ -11,7 +11,6 @@
package de.ellpeck.actuallyadditions.mod.items; package de.ellpeck.actuallyadditions.mod.items;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.items.base.*; import de.ellpeck.actuallyadditions.mod.items.base.*;
import de.ellpeck.actuallyadditions.mod.items.lens.ItemLens; import de.ellpeck.actuallyadditions.mod.items.lens.ItemLens;
@ -199,15 +198,10 @@ public final class InitItems{
public static Item itemEngineerGoggles; public static Item itemEngineerGoggles;
public static Item itemEngineerGogglesAdvanced; public static Item itemEngineerGogglesAdvanced;
public static Item itemCrystalShard; public static Item itemCrystalShard;
public static Item itemCrystalChisel;
public static void init(){ public static void init(){
ModUtil.LOGGER.info("Initializing Items..."); ModUtil.LOGGER.info("Initializing Items...");
if(ActuallyAdditions.isCaveMode){
itemCrystalChisel = new ItemCrystalChisel("item_crystal_chisel");
}
itemCrystalShard = new ItemCrystalShard("item_crystal_shard"); itemCrystalShard = new ItemCrystalShard("item_crystal_shard");
itemEngineerGogglesAdvanced = new ItemEngineerGoggles("item_engineer_goggles_advanced", true); itemEngineerGogglesAdvanced = new ItemEngineerGoggles("item_engineer_goggles_advanced", true);
itemEngineerGoggles = new ItemEngineerGoggles("item_engineer_goggles", false); itemEngineerGoggles = new ItemEngineerGoggles("item_engineer_goggles", false);

View file

@ -1,62 +0,0 @@
/*
* This file ("ItemCrystalChisel.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.items;
import de.ellpeck.actuallyadditions.mod.blocks.BlockCrystalCluster;
import de.ellpeck.actuallyadditions.mod.cave.WorldTypeCave;
import de.ellpeck.actuallyadditions.mod.gen.WorldGenLushCaves;
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.common.util.FakePlayer;
import org.apache.commons.lang3.ArrayUtils;
public class ItemCrystalChisel extends ItemBase{
public ItemCrystalChisel(String name){
super(name);
this.setMaxStackSize(1);
this.setMaxDamage(64);
}
@Override
public boolean canHarvestBlock(IBlockState block){
return block.getBlock() instanceof BlockCrystalCluster;
}
@Override
public boolean onBlockStartBreak(ItemStack stack, BlockPos pos, EntityPlayer player){
if(WorldTypeCave.is(player.world) && !(player instanceof FakePlayer)){
IBlockState state = player.world.getBlockState(pos);
if(state.getBlock() instanceof BlockCrystalCluster){
int index = ArrayUtils.indexOf(WorldGenLushCaves.CRYSTAL_CLUSTERS, state.getBlock());
if(index >= 0){
if(!player.world.isRemote){
if(player.world.rand.nextBoolean()){
ItemStack drop = new ItemStack(InitItems.itemCrystalShard, player.world.rand.nextInt(3)+1, index);
EntityItem item = new EntityItem(player.world, pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, drop);
player.world.spawnEntity(item);
}
stack.damageItem(1, player);
}
return true;
}
}
}
return false;
}
}

View file

@ -1,6 +1,8 @@
#General #General
itemGroup.actuallyadditions=Actually Additions itemGroup.actuallyadditions=Actually Additions
achievement.page.actuallyadditions=Actually Additions achievement.page.actuallyadditions=Actually Additions
generator.actaddcaves=AA Cave Mode
generator.actaddcaves.info=Actually Additions Cave Mode (like Skyblock but in a cave and with Actually Additions)
actuallyadditions.lolWutHowUDoDis.name=This is bugged. Throw it away. Please. actuallyadditions.lolWutHowUDoDis.name=This is bugged. Throw it away. Please.
#Fluids #Fluids