mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-17 03:05:10 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
a314fccd1b
commit
8f026dad8f
161 files changed
+14073
-12846
No files matched your search
@@ -2,41 +2,48 @@ package team.chisel.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import team.chisel.carving.Carving;
|
||||
import team.chisel.item.ItemCarvable;
|
||||
|
||||
import com.cricketcraft.chisel.api.ChiselTabs;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.CarvingUtils;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class CarvableStairsMaker {
|
||||
|
||||
public final CarvableHelper carverHelper;
|
||||
private Block blockBase;
|
||||
public final CarvableHelper carverHelper;
|
||||
private Block blockBase;
|
||||
|
||||
public CarvableStairsMaker(Block base) {
|
||||
blockBase = base;
|
||||
carverHelper = new CarvableHelper(base);
|
||||
}
|
||||
public CarvableStairsMaker(Block base) {
|
||||
blockBase = base;
|
||||
carverHelper = new CarvableHelper(base);
|
||||
}
|
||||
|
||||
public void create(String name, Block[] blocks) {
|
||||
create(null, name, blocks);
|
||||
}
|
||||
public void create(String name, Block[] blocks) {
|
||||
create(null, name, blocks);
|
||||
}
|
||||
|
||||
public void create(IStairsCreator creator, String name, Block[] blocks) {
|
||||
for (int i = 0; i < blocks.length; i++) {
|
||||
String n = name + "." + i;
|
||||
blocks[i] = creator == null ? new BlockCarvableStairs(blockBase, i * 2, carverHelper) : creator.create(blockBase, i * 2, carverHelper);
|
||||
public void create(IStairsCreator creator, String name, Block[] blocks) {
|
||||
for (int i = 0; i < blocks.length; i++) {
|
||||
String n = name + "." + i;
|
||||
blocks[i] = creator == null ? new BlockCarvableStairs(blockBase, i * 2, carverHelper)
|
||||
: creator.create(blockBase, i * 2, carverHelper);
|
||||
|
||||
blocks[i].setBlockName("chisel." + n).setCreativeTab(ChiselTabs.tabStairChiselBlocks);
|
||||
GameRegistry.registerBlock(blocks[i], ItemCarvable.class, n);
|
||||
blocks[i].setBlockName("chisel." + n).setCreativeTab(ChiselTabs.tabStairChiselBlocks);
|
||||
GameRegistry.registerBlock(blocks[i], ItemCarvable.class, n);
|
||||
|
||||
for (int meta = 0; meta < 2 && i * 2 + meta < carverHelper.infoList.size(); meta++) {
|
||||
Carving.chisel.addVariation(name, CarvingUtils.getDefaultVariationFor(blocks[i], meta * 8, i));
|
||||
GameRegistry.addRecipe(new ItemStack(blocks[i], 4, meta * 8), "* ", "** ", "***", '*', new ItemStack(blockBase, 1, i * 2 + meta));
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int meta = 0; meta < 2 && i * 2 + meta < carverHelper.infoList.size(); meta++) {
|
||||
Carving.chisel.addVariation(name, CarvingUtils.getDefaultVariationFor(blocks[i], meta * 8, i));
|
||||
GameRegistry.addRecipe(
|
||||
new ItemStack(blocks[i], 4, meta * 8),
|
||||
"* ",
|
||||
"** ",
|
||||
"***",
|
||||
'*',
|
||||
new ItemStack(blockBase, 1, i * 2 + meta));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user