mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-28 16:06:07 +00:00
* BS + SA * Intellij Cleanups * Add missing overrides * Cleanup fire code * Less allocations * Get rid of BlockTuple -> Far fewer allocations (It was only used for Ordo Fire which isn't very useful for NH) Neuter Ordo fire (will be reworked once we figure out what it should do) Mixin to fix fire rendering on water -- call the subclass's canCatchFire instead of the base class Properly tether the fire spread to 15 blocks from the source, which never burns out. * rm * Spotless
111 lines
3.3 KiB
Java
111 lines
3.3 KiB
Java
package thaumic.tinkerer.common.block.mobilizer;
|
|
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
import net.minecraft.init.Blocks;
|
|
import net.minecraft.init.Items;
|
|
import net.minecraft.item.ItemBlock;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.tileentity.TileEntity;
|
|
import net.minecraft.util.IIcon;
|
|
import net.minecraft.world.World;
|
|
import net.minecraftforge.common.util.ForgeDirection;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import thaumcraft.api.aspects.Aspect;
|
|
import thaumcraft.api.aspects.AspectList;
|
|
import thaumcraft.common.config.ConfigBlocks;
|
|
import thaumcraft.common.config.ConfigItems;
|
|
import thaumic.tinkerer.client.core.helper.IconHelper;
|
|
import thaumic.tinkerer.common.block.BlockMod;
|
|
import thaumic.tinkerer.common.block.tile.TileEntityRelay;
|
|
import thaumic.tinkerer.common.lib.LibBlockNames;
|
|
import thaumic.tinkerer.common.lib.LibResearch;
|
|
import thaumic.tinkerer.common.registry.ThaumicTinkererArcaneRecipe;
|
|
import thaumic.tinkerer.common.registry.ThaumicTinkererRecipe;
|
|
import thaumic.tinkerer.common.research.IRegisterableResearch;
|
|
|
|
public class BlockMobilizerRelay extends BlockMod {
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
private IIcon iconTop;
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
private IIcon iconBottom;
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
private IIcon iconSide;
|
|
|
|
public BlockMobilizerRelay() {
|
|
super(Material.iron);
|
|
}
|
|
|
|
@Override
|
|
public boolean hasTileEntity(int metadata) {
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public TileEntity createTileEntity(World world, int metadata) {
|
|
return new TileEntityRelay();
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
|
iconBottom = IconHelper.forBlock(iconRegister, this, 0);
|
|
iconTop = IconHelper.forBlock(iconRegister, this, 1);
|
|
iconSide = IconHelper.forBlock(iconRegister, this, 2);
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public IIcon getIcon(int par1, int meta) {
|
|
return par1 == ForgeDirection.UP.ordinal() ? iconTop
|
|
: par1 == ForgeDirection.DOWN.ordinal() ? iconBottom : iconSide;
|
|
}
|
|
|
|
@Override
|
|
public String getBlockName() {
|
|
return LibBlockNames.MOBILIZER_RELAY;
|
|
}
|
|
|
|
@Override
|
|
public Class<? extends ItemBlock> getItemBlock() {
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public Class<? extends TileEntity> getTileEntity() {
|
|
return TileEntityRelay.class;
|
|
}
|
|
|
|
@Override
|
|
public IRegisterableResearch getResearchItem() {
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public ThaumicTinkererRecipe getRecipeItem() {
|
|
return new ThaumicTinkererArcaneRecipe(
|
|
LibResearch.KEY_RELAY,
|
|
LibResearch.KEY_MOBILIZER,
|
|
new ItemStack(this),
|
|
new AspectList().add(Aspect.AIR, 20).add(Aspect.ORDER, 5).add(Aspect.EARTH, 15),
|
|
"WFW",
|
|
"SIs",
|
|
"WFW",
|
|
'I',
|
|
new ItemStack(Items.iron_ingot),
|
|
's',
|
|
new ItemStack(ConfigItems.itemShard, 1, 3),
|
|
'S',
|
|
new ItemStack(ConfigItems.itemShard),
|
|
'W',
|
|
new ItemStack(ConfigBlocks.blockMagicalLog),
|
|
'F',
|
|
new ItemStack(Blocks.glass));
|
|
}
|
|
}
|