Cut all the things!
This commit is contained in:
parent
5821dbfe0e
commit
b242ec5c5f
11 changed files with 72 additions and 0 deletions
|
@ -6,6 +6,7 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
public class BlockFusionCoil extends BlockMachineBase {
|
||||
|
||||
|
@ -21,6 +22,7 @@ public class BlockFusionCoil extends BlockMachineBase {
|
|||
public BlockFusionCoil(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.fusioncoil");
|
||||
ModBlocks.blocksToCut.add(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -36,6 +36,7 @@ public class BlockMachineBase extends BlockContainer {
|
|||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(2f);
|
||||
setStepSound(soundTypeMetal);
|
||||
// ModBlocks.blocksToCut.add(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,6 +17,7 @@ import reborncore.common.multiblock.BlockMultiblockBase;
|
|||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.client.texture.CasingConnectedTextureGenerator;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.tiles.TileMachineCasing;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -33,6 +34,7 @@ public class BlockMachineCasing extends BlockMultiblockBase {
|
|||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setBlockName("techreborn.machineCasing");
|
||||
setHardness(2F);
|
||||
ModBlocks.blocksToCut.add(this);
|
||||
}
|
||||
|
||||
public static int getHeatFromMeta(int meta) {
|
||||
|
|
|
@ -38,6 +38,7 @@ public class BlockMachineFrame extends Block {
|
|||
setBlockName("techreborn.machineFrame");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(1f);
|
||||
ModBlocks.blocksToCut.add(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -55,6 +55,7 @@ public class BlockOre extends Block {
|
|||
setBlockName("techreborn.ore");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
setHardness(2.0f);
|
||||
ModBlocks.blocksToCut.add(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,6 +16,7 @@ import net.minecraft.world.World;
|
|||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.tiles.TileQuantumChest;
|
||||
|
||||
public class BlockQuantumChest extends BlockContainer {
|
||||
|
@ -34,6 +35,7 @@ public class BlockQuantumChest extends BlockContainer {
|
|||
setBlockName("techreborn.quantumChest");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(2.0F);
|
||||
ModBlocks.blocksToCut.add(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -44,6 +44,7 @@ public class BlockStorage extends Block {
|
|||
setBlockName("techreborn.storage");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
setHardness(2f);
|
||||
ModBlocks.blocksToCut.add(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -40,6 +40,7 @@ public class BlockStorage2 extends Block {
|
|||
setBlockName("techreborn.storage2");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
setHardness(2f);
|
||||
ModBlocks.blocksToCut.add(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,6 +3,7 @@ package techreborn.compat;
|
|||
import cpw.mods.fml.common.Loader;
|
||||
import ic2.api.info.IC2Classic;
|
||||
import techreborn.compat.ee3.EmcValues;
|
||||
import techreborn.compat.fmp.ForgeMultipartCompat;
|
||||
import techreborn.compat.minetweaker.MinetweakerCompat;
|
||||
import techreborn.compat.recipes.*;
|
||||
import techreborn.compat.waila.CompatModuleWaila;
|
||||
|
@ -45,6 +46,7 @@ public class CompatManager {
|
|||
registerCompact(RecipesThaumcraft.class, "Thaumcraft");
|
||||
registerCompact(RecipesForestry.class, "Forestry", isForestry4());
|
||||
registerCompact(MinetweakerCompat.class, "MineTweaker3");
|
||||
registerCompact(ForgeMultipartCompat.class, "ForgeMultipart");
|
||||
}
|
||||
|
||||
public void registerCompact(Class<?> moduleClass, Object... objs) {
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
package techreborn.compat.fmp;
|
||||
|
||||
import codechicken.microblock.BlockMicroMaterial;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import techreborn.compat.ICompatModule;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by modmuss50 on 02/01/2016 for TechReborn-1.7.
|
||||
*/
|
||||
public class ForgeMultipartCompat implements ICompatModule {
|
||||
|
||||
@Override
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(FMLInitializationEvent event) {
|
||||
for(Block block : ModBlocks.blocksToCut){
|
||||
cuttableBlock(block);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serverStarting(FMLServerStartingEvent event) {
|
||||
|
||||
}
|
||||
|
||||
public void cuttableBlock(Block block){
|
||||
if(Item.getItemFromBlock(block).getHasSubtypes()){
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
block.getSubBlocks(null, null, list);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
BlockMicroMaterial.createAndRegister(block, i);
|
||||
}
|
||||
} else {
|
||||
BlockMicroMaterial.createAndRegister(block, 0);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -21,8 +21,12 @@ import techreborn.tiles.idsu.TileIDSU;
|
|||
import techreborn.tiles.lesu.TileLesu;
|
||||
import techreborn.tiles.lesu.TileLesuStorage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ModBlocks {
|
||||
|
||||
public static ArrayList<Block> blocksToCut = new ArrayList<Block>();
|
||||
|
||||
public static Block thermalGenerator;
|
||||
public static Block quantumTank;
|
||||
public static Block quantumChest;
|
||||
|
|
Loading…
Reference in a new issue