forked from Drillgon200/Hbm-s-Nuclear-Tech-GIT
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from 70000hp/Main-1.12
Main 1.12
- Loading branch information
Showing
60 changed files
with
3,529 additions
and
351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package api.hbm.tile; | ||
|
||
public interface IHeatSource { | ||
|
||
public int getHeatStored(); | ||
|
||
/** | ||
* Removes heat from the system. Implementation has to include the checks preventing the heat from going into the negative. | ||
* @param heat | ||
*/ | ||
public void useUpHeat(int heat); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.hbm.blocks; | ||
|
||
import java.util.List; | ||
|
||
import org.lwjgl.input.Keyboard; | ||
|
||
import com.hbm.util.I18nUtil; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.item.EnumRarity; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.text.TextFormatting; | ||
|
||
public interface ITooltipProvider { | ||
|
||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext); | ||
|
||
@SuppressWarnings("unchecked") | ||
public default void addStandardInfo(ItemStack stack, EntityPlayer player, List list, boolean ext) { | ||
|
||
if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { | ||
for(String s : I18nUtil.resolveKeyArray(((Block)this).getUnlocalizedName() + ".desc")) list.add(TextFormatting.YELLOW + s); | ||
} else { | ||
list.add(TextFormatting.DARK_GRAY + "" + TextFormatting.ITALIC +"Hold <" + | ||
TextFormatting.YELLOW + "" + TextFormatting.ITALIC + "LSHIFT" + | ||
TextFormatting.DARK_GRAY + "" + TextFormatting.ITALIC + "> to display more info"); | ||
} | ||
} | ||
|
||
public default EnumRarity getRarity(ItemStack stack) { | ||
return EnumRarity.COMMON; | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.hbm.blocks.machine; | ||
|
||
import java.util.List; | ||
|
||
import com.hbm.blocks.BlockDummyable; | ||
import com.hbm.blocks.ITooltipProvider; | ||
import com.hbm.tileentity.TileEntityProxyCombo; | ||
import com.hbm.tileentity.machine.TileEntityFurnaceSteel; | ||
|
||
import net.minecraft.block.material.Material; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.tileentity.TileEntity; | ||
import net.minecraft.util.EnumFacing; | ||
import net.minecraft.util.EnumHand; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
|
||
public class FurnaceSteel extends BlockDummyable implements ITooltipProvider { | ||
|
||
public FurnaceSteel(Material mat, String s) { | ||
super(Material.IRON, s); | ||
} | ||
|
||
@Override | ||
public TileEntity createNewTileEntity(World world, int meta) { | ||
if(meta >= 12) return new TileEntityFurnaceSteel(); | ||
return new TileEntityProxyCombo(true, false, false); | ||
} | ||
|
||
@Override | ||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { | ||
return standardOpenBehavior(world, pos.getX(), pos.getY(), pos.getZ(), player, 0); | ||
} | ||
|
||
@Override | ||
public int[] getDimensions() { | ||
return new int[] {1, 0, 1, 1, 1, 1}; | ||
} | ||
|
||
@Override | ||
public int getOffset() { | ||
return 1; | ||
} | ||
|
||
@Override | ||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { | ||
this.addStandardInfo(stack, player, list, ext); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package com.hbm.blocks.machine; | ||
|
||
import java.util.List; | ||
|
||
import com.hbm.blocks.BlockDummyable; | ||
import com.hbm.blocks.ITooltipProvider; | ||
import com.hbm.tileentity.TileEntityProxyCombo; | ||
import com.hbm.tileentity.machine.TileEntityHeaterFirebox; | ||
|
||
import net.minecraft.block.material.Material; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.tileentity.TileEntity; | ||
import net.minecraft.util.EnumFacing; | ||
import net.minecraft.util.EnumHand; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
|
||
public class HeaterFirebox extends BlockDummyable implements ITooltipProvider { | ||
|
||
public HeaterFirebox(Material mat, String s) { | ||
super(Material.IRON, s); | ||
} | ||
|
||
@Override | ||
public TileEntity createNewTileEntity(World world, int meta) { | ||
|
||
if(meta >= 12) | ||
return new TileEntityHeaterFirebox(); | ||
|
||
return new TileEntityProxyCombo(true, false, false); | ||
} | ||
|
||
@Override | ||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { | ||
return standardOpenBehavior(world, pos.getX(), pos.getY(), pos.getZ(), player, 0); | ||
} | ||
|
||
@Override | ||
public int[] getDimensions() { | ||
return new int[] {0, 0, 1, 1, 1, 1}; | ||
} | ||
|
||
@Override | ||
public int getOffset() { | ||
return 1; | ||
} | ||
|
||
@Override | ||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { | ||
this.addStandardInfo(stack, player, list, ext); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.