mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-11 15:57:31 +00:00
Chisel-2/Chisel-2#403 Fix stair registration
Also fix packed ice stairs leaving water when broken
This commit is contained in:
1 parent
2de05abcbc
commit
ab6fab4e64
3 files changed
+22
-21
No files matched your search
@@ -3,7 +3,6 @@ package com.cricketcraft.chisel.api.carving;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import team.chisel.ctmlib.ISubmapManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -15,6 +14,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import team.chisel.ctmlib.ISubmapManager;
|
||||
|
||||
import com.cricketcraft.chisel.api.ChiselAPIProps;
|
||||
import com.cricketcraft.chisel.api.FMPIMC;
|
||||
@@ -100,7 +100,7 @@ public class CarvableHelper {
|
||||
}
|
||||
|
||||
private IVariationInfo getClientInfo(String modid, String texture, String description, int metadata, Block block, int blockMeta, ISubmapManager customManager, int order) {
|
||||
ICarvingVariation var = CarvingUtils.getDefaultVariationFor(theBlock, metadata, order);
|
||||
ICarvingVariation var = CarvingUtils.getDefaultVariationFor(getBlock(), metadata, order);
|
||||
TextureType type = TextureType.getTypeFor(this, modid, texture);
|
||||
if (type == TextureType.CUSTOM && customManager == null && block == null) {
|
||||
throw new IllegalArgumentException(String.format("Could not find texture %s, and no custom texture manager was provided.", texture));
|
||||
@@ -118,7 +118,7 @@ public class CarvableHelper {
|
||||
}
|
||||
|
||||
private IVariationInfo getServerInfo(String modid, String texture, String description, int metadata, Block block, int blockMeta, ISubmapManager customManager, int order) {
|
||||
ICarvingVariation var = CarvingUtils.getDefaultVariationFor(theBlock, metadata, order);
|
||||
ICarvingVariation var = CarvingUtils.getDefaultVariationFor(getBlock(), metadata, order);
|
||||
return new VariationInfoBase(var, description, null);
|
||||
}
|
||||
|
||||
@@ -209,11 +209,15 @@ public class CarvableHelper {
|
||||
}
|
||||
|
||||
public void registerOre(String ore) {
|
||||
OreDictionary.registerOre(ore, theBlock);
|
||||
OreDictionary.registerOre(ore, getBlock());
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getMissingIcon() {
|
||||
return ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.locationBlocksTexture)).getAtlasSprite("missingno");
|
||||
}
|
||||
|
||||
public Block getBlock() {
|
||||
return theBlock;
|
||||
}
|
||||
}
|
||||
@@ -20,12 +20,12 @@ public class BlockCarvablePackedIceStairs extends BlockCarvableStairs {
|
||||
|
||||
@Override
|
||||
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6) {
|
||||
ChiselBlocks.ice.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6);
|
||||
ChiselBlocks.packedice.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random par1Random) {
|
||||
return ChiselBlocks.ice.quantityDropped(par1Random);
|
||||
return ChiselBlocks.packedice.quantityDropped(par1Random);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -35,7 +35,7 @@ public class BlockCarvablePackedIceStairs extends BlockCarvableStairs {
|
||||
|
||||
@Override
|
||||
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {
|
||||
ChiselBlocks.ice.updateTick(par1World, par2, par3, par4, par5Random);
|
||||
ChiselBlocks.packedice.updateTick(par1World, par2, par3, par4, par5Random);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
package team.chisel.block;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
|
||||
import com.cricketcraft.chisel.api.ChiselTabs;
|
||||
import team.chisel.item.ItemCarvable;
|
||||
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 CarvableHelper carverHelper;
|
||||
// int idStart;
|
||||
Block blockBase;
|
||||
String blockName;
|
||||
public final CarvableHelper carverHelper;
|
||||
private Block blockBase;
|
||||
|
||||
public CarvableStairsMaker(Block base) {
|
||||
carverHelper = new CarvableHelper(base);
|
||||
blockBase = base;
|
||||
carverHelper = new CarvableHelper(base);
|
||||
}
|
||||
|
||||
public void create(String name, Block[] blocks) {
|
||||
@@ -34,10 +34,7 @@ public class CarvableStairsMaker {
|
||||
GameRegistry.registerBlock(blocks[i], ItemCarvable.class, n);
|
||||
|
||||
for (int meta = 0; meta < 2 && i * 2 + meta < carverHelper.infoList.size(); meta++) {
|
||||
IVariationInfo info = carverHelper.infoList.get(i * 2 + meta);
|
||||
|
||||
carverHelper.registerVariation(name, info);
|
||||
|
||||
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