mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-16 10:44:53 +00:00
* Added missing ru_RU localization * Fixed first letter * Rename Binnie.Language to short Binnie.I18N Removed some unused methods, classes. Removed some hardcod strings, replaced it on i18n Moved pigment colors of blocks and items to tooltips
65 lines
1.7 KiB
Java
65 lines
1.7 KiB
Java
package binnie.extratrees.carpentry;
|
|
|
|
import binnie.Binnie;
|
|
import binnie.botany.Botany;
|
|
import binnie.extratrees.ExtraTrees;
|
|
import binnie.extratrees.api.IDesign;
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import forestry.api.core.Tabs;
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.world.IBlockAccess;
|
|
|
|
import java.util.Random;
|
|
|
|
public class BlockStainedDesign extends BlockDesign {
|
|
public BlockStainedDesign() {
|
|
super(DesignSystem.Glass, Material.glass);
|
|
setCreativeTab(Tabs.tabArboriculture);
|
|
setBlockName("stainedGlass");
|
|
}
|
|
|
|
@Override
|
|
public int quantityDropped(Random p_149745_1_) {
|
|
return 0;
|
|
}
|
|
|
|
@Override
|
|
public boolean isOpaqueCube() {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean renderAsNormalBlock() {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public int getRenderBlockPass() {
|
|
return 1;
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) {
|
|
// Block block2 = world.getBlock(x - Facing.offsetsXForSide[side], y - Facing.offsetsYForSide[side], z - Facing.offsetsZForSide[side]);
|
|
Block block = world.getBlock(x, y, z);
|
|
return block != this
|
|
&& block != Botany.stained
|
|
&& super.shouldSideBeRendered(world, x, y, z, side);
|
|
}
|
|
|
|
@Override
|
|
public ItemStack getCreativeStack(IDesign design) {
|
|
return ModuleCarpentry.getItemStack(this, GlassType.get(0), GlassType.get(1), design);
|
|
}
|
|
|
|
@Override
|
|
public String getBlockName(DesignBlock design) {
|
|
return Binnie.I18N.localise(ExtraTrees.instance, "block.stainedglass.name", design.getDesign().getName());
|
|
}
|
|
}
|