mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
Merge branch 'HbmMods:master' into rulang121
This commit is contained in:
commit
6c20fb009b
10
changelog
10
changelog
@ -20,6 +20,10 @@
|
|||||||
* AUTOCAL Automatic Calculator
|
* AUTOCAL Automatic Calculator
|
||||||
* Highly advanced programmable RoR device
|
* Highly advanced programmable RoR device
|
||||||
* Can send and receive signals and do calculations with the same system as NTM's calculator
|
* Can send and receive signals and do calculations with the same system as NTM's calculator
|
||||||
|
* Vending machines
|
||||||
|
* Comes in snack machine and soda machine variants
|
||||||
|
* The machines can be purchased off of bobmazon for 64 caps each
|
||||||
|
* Use vending machine tokens as currency, which can be found occasionally in most structures
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
* RoR graphs can now have their min and max bounds set to a fixed number
|
* RoR graphs can now have their min and max bounds set to a fixed number
|
||||||
@ -48,6 +52,11 @@
|
|||||||
* The automatic buzzsaw and thresher now have sound loops when active
|
* The automatic buzzsaw and thresher now have sound loops when active
|
||||||
* The shredder auto shotgun now uses the plasma damage type instead of laser
|
* The shredder auto shotgun now uses the plasma damage type instead of laser
|
||||||
* Added "nitra to ammunition" recipe in the assembly machine, turning large piles of nitra into random casings/propellants
|
* Added "nitra to ammunition" recipe in the assembly machine, turning large piles of nitra into random casings/propellants
|
||||||
|
* Removed more unused blocks to free up block IDs
|
||||||
|
* Removed the old iron barrel
|
||||||
|
* Removed the factory hull blocks
|
||||||
|
* Removed the vacuum block that has been unused for like 5 years at this point
|
||||||
|
* Removed five of the 10 stuurdy ladder variants because they were hella ugly anyway
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
* Fixed RoR graph showing the wrong name in the GUI
|
* Fixed RoR graph showing the wrong name in the GUI
|
||||||
@ -57,3 +66,4 @@
|
|||||||
* Fixed RoR transmitter sending empty signals when unused mappings apply
|
* Fixed RoR transmitter sending empty signals when unused mappings apply
|
||||||
* Fixed hopper IO for battery sockets being entirely broken
|
* Fixed hopper IO for battery sockets being entirely broken
|
||||||
* Fixed cargo elevators not dropping the correct amount of segments
|
* Fixed cargo elevators not dropping the correct amount of segments
|
||||||
|
* Fixed broken config check causing smithing recipes in anvils to always be tier 1
|
||||||
|
|||||||
@ -273,6 +273,7 @@ public class ModBlocks {
|
|||||||
public static Block snowglobe;
|
public static Block snowglobe;
|
||||||
public static Block plushie;
|
public static Block plushie;
|
||||||
public static Block dungeon_spawner;
|
public static Block dungeon_spawner;
|
||||||
|
public static Block vending_machine;
|
||||||
|
|
||||||
public static Block gravel_obsidian;
|
public static Block gravel_obsidian;
|
||||||
public static Block gravel_diamond;
|
public static Block gravel_diamond;
|
||||||
@ -815,21 +816,15 @@ public class ModBlocks {
|
|||||||
public static Block chain;
|
public static Block chain;
|
||||||
|
|
||||||
public static Block ladder_sturdy;
|
public static Block ladder_sturdy;
|
||||||
public static Block ladder_iron;
|
|
||||||
public static Block ladder_gold;
|
public static Block ladder_gold;
|
||||||
public static Block ladder_aluminium;
|
|
||||||
public static Block ladder_copper;
|
public static Block ladder_copper;
|
||||||
public static Block ladder_titanium;
|
public static Block ladder_titanium;
|
||||||
public static Block ladder_lead;
|
|
||||||
public static Block ladder_cobalt;
|
|
||||||
public static Block ladder_steel;
|
public static Block ladder_steel;
|
||||||
public static Block ladder_tungsten;
|
|
||||||
|
|
||||||
public static Block trapdoor_steel;
|
public static Block trapdoor_steel;
|
||||||
|
|
||||||
public static Block barrel_plastic;
|
public static Block barrel_plastic;
|
||||||
@Deprecated public static Block barrel_corroded;
|
public static Block barrel_corroded;
|
||||||
@Deprecated public static Block barrel_iron;
|
|
||||||
public static Block barrel_steel;
|
public static Block barrel_steel;
|
||||||
public static Block barrel_tcalloy;
|
public static Block barrel_tcalloy;
|
||||||
public static Block barrel_antimatter;
|
public static Block barrel_antimatter;
|
||||||
@ -848,9 +843,6 @@ public class ModBlocks {
|
|||||||
public static Block struct_watz_core;
|
public static Block struct_watz_core;
|
||||||
public static Block struct_icf_core;
|
public static Block struct_icf_core;
|
||||||
|
|
||||||
@Deprecated public static Block factory_titanium_hull;
|
|
||||||
@Deprecated public static Block factory_advanced_hull;
|
|
||||||
|
|
||||||
public static Block cm_block;
|
public static Block cm_block;
|
||||||
public static Block cm_sheet;
|
public static Block cm_sheet;
|
||||||
public static Block cm_engine;
|
public static Block cm_engine;
|
||||||
@ -995,7 +987,7 @@ public class ModBlocks {
|
|||||||
public static Block machine_mixer;
|
public static Block machine_mixer;
|
||||||
|
|
||||||
public static Block machine_fluidtank;
|
public static Block machine_fluidtank;
|
||||||
public static Block machine_bat9000;
|
@Deprecated public static Block machine_bat9000;
|
||||||
public static Block machine_bigasstank;
|
public static Block machine_bigasstank;
|
||||||
public static Block machine_orbus;
|
public static Block machine_orbus;
|
||||||
|
|
||||||
@ -1157,7 +1149,6 @@ public class ModBlocks {
|
|||||||
public static Block gas_coal;
|
public static Block gas_coal;
|
||||||
public static Block gas_flammable;
|
public static Block gas_flammable;
|
||||||
public static Block gas_explosive;
|
public static Block gas_explosive;
|
||||||
public static Block vacuum;
|
|
||||||
|
|
||||||
public static Block rad_absorber;
|
public static Block rad_absorber;
|
||||||
public static Block decon;
|
public static Block decon;
|
||||||
@ -1450,6 +1441,7 @@ public class ModBlocks {
|
|||||||
snowglobe = new BlockSnowglobe().setBlockName("snowglobe").setCreativeTab(MainRegistry.blockTab).setHardness(0.0F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":glass_boron");
|
snowglobe = new BlockSnowglobe().setBlockName("snowglobe").setCreativeTab(MainRegistry.blockTab).setHardness(0.0F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":glass_boron");
|
||||||
plushie = new BlockPlushie().setBlockName("plushie").setStepSound(Block.soundTypeCloth).setResistance(50_0000.0F).setCreativeTab(MainRegistry.blockTab).setHardness(0.0F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":block_fiberglass_side");
|
plushie = new BlockPlushie().setBlockName("plushie").setStepSound(Block.soundTypeCloth).setResistance(50_0000.0F).setCreativeTab(MainRegistry.blockTab).setHardness(0.0F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":block_fiberglass_side");
|
||||||
dungeon_spawner = new DungeonSpawner().setBlockName("dungeon_spawner").setResistance(50_0000.0F).setBlockUnbreakable().setBlockTextureName(RefStrings.MODID + ":dungeon_spawner");
|
dungeon_spawner = new DungeonSpawner().setBlockName("dungeon_spawner").setResistance(50_0000.0F).setBlockUnbreakable().setBlockTextureName(RefStrings.MODID + ":dungeon_spawner");
|
||||||
|
vending_machine = new BlockVendingMachine().setBlockName("vending_machine").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
|
||||||
gravel_obsidian = new BlockFalling(Material.iron).setBlockName("gravel_obsidian").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGravel).setHardness(5.0F).setResistance(240.0F).setBlockTextureName(RefStrings.MODID + ":gravel_obsidian");
|
gravel_obsidian = new BlockFalling(Material.iron).setBlockName("gravel_obsidian").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGravel).setHardness(5.0F).setResistance(240.0F).setBlockTextureName(RefStrings.MODID + ":gravel_obsidian");
|
||||||
gravel_diamond = new BlockFalling(Material.sand).setBlockName("gravel_diamond").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGravel).setHardness(0.6F).setBlockTextureName(RefStrings.MODID + ":gravel_diamond");
|
gravel_diamond = new BlockFalling(Material.sand).setBlockName("gravel_diamond").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGravel).setHardness(0.6F).setBlockTextureName(RefStrings.MODID + ":gravel_diamond");
|
||||||
@ -1930,21 +1922,15 @@ public class ModBlocks {
|
|||||||
chain = new BlockChain(Material.iron).setBlockName("dungeon_chain").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":chain");
|
chain = new BlockChain(Material.iron).setBlockName("dungeon_chain").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":chain");
|
||||||
|
|
||||||
ladder_sturdy = new BlockNTMLadder().setBlockName("ladder_sturdy").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ladder_sturdy");
|
ladder_sturdy = new BlockNTMLadder().setBlockName("ladder_sturdy").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ladder_sturdy");
|
||||||
ladder_iron = new BlockNTMLadder().setBlockName("ladder_iron").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ladder_iron");
|
|
||||||
ladder_gold = new BlockNTMLadder().setBlockName("ladder_gold").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ladder_gold");
|
ladder_gold = new BlockNTMLadder().setBlockName("ladder_gold").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ladder_gold");
|
||||||
ladder_aluminium = new BlockNTMLadder().setBlockName("ladder_aluminium").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ladder_aluminium");
|
|
||||||
ladder_copper = new BlockNTMLadder().setBlockName("ladder_copper").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ladder_copper");
|
ladder_copper = new BlockNTMLadder().setBlockName("ladder_copper").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ladder_copper");
|
||||||
ladder_titanium = new BlockNTMLadder().setBlockName("ladder_titanium").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ladder_titanium");
|
ladder_titanium = new BlockNTMLadder().setBlockName("ladder_titanium").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ladder_titanium");
|
||||||
ladder_lead = new BlockNTMLadder().setBlockName("ladder_lead").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ladder_lead");
|
|
||||||
ladder_cobalt = new BlockNTMLadder().setBlockName("ladder_cobalt").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ladder_cobalt");
|
|
||||||
ladder_steel = new BlockNTMLadder().setBlockName("ladder_steel").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ladder_steel");
|
ladder_steel = new BlockNTMLadder().setBlockName("ladder_steel").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ladder_steel");
|
||||||
ladder_tungsten = new BlockNTMLadder().setBlockName("ladder_tungsten").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ladder_tungsten");
|
|
||||||
|
|
||||||
trapdoor_steel = new BlockNTMTrapdoor(Material.iron).setBlockName("trapdoor_steel").setHardness(3F).setResistance(8.0F).setStepSound(Block.soundTypeMetal).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":trapdoor_steel");
|
trapdoor_steel = new BlockNTMTrapdoor(Material.iron).setBlockName("trapdoor_steel").setHardness(3F).setResistance(8.0F).setStepSound(Block.soundTypeMetal).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":trapdoor_steel");
|
||||||
|
|
||||||
barrel_plastic = new BlockFluidBarrel(Material.iron, 12000).setBlockName("barrel_plastic").setStepSound(Block.soundTypeStone).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_plastic");
|
barrel_plastic = new BlockFluidBarrel(Material.iron, 12000).setBlockName("barrel_plastic").setStepSound(Block.soundTypeStone).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_plastic");
|
||||||
barrel_corroded = new BlockFluidBarrel(Material.iron, 6000).setBlockName("barrel_corroded").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":barrel_corroded");
|
barrel_corroded = new BlockFluidBarrel(Material.iron, 6000).setBlockName("barrel_corroded").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":barrel_corroded");
|
||||||
barrel_iron = new BlockFluidBarrel(Material.iron, 8000).setBlockName("barrel_iron").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":barrel_iron");
|
|
||||||
barrel_steel = new BlockFluidBarrel(Material.iron, 16000).setBlockName("barrel_steel").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_steel");
|
barrel_steel = new BlockFluidBarrel(Material.iron, 16000).setBlockName("barrel_steel").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_steel");
|
||||||
barrel_tcalloy = new BlockFluidBarrel(Material.iron, 24000).setBlockName("barrel_tcalloy").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_tcalloy");
|
barrel_tcalloy = new BlockFluidBarrel(Material.iron, 24000).setBlockName("barrel_tcalloy").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_tcalloy");
|
||||||
barrel_antimatter = new BlockFluidBarrel(Material.iron, 16000).setBlockName("barrel_antimatter").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_antimatter");
|
barrel_antimatter = new BlockFluidBarrel(Material.iron, 16000).setBlockName("barrel_antimatter").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_antimatter");
|
||||||
@ -1968,9 +1954,6 @@ public class ModBlocks {
|
|||||||
struct_watz_core = new BlockWatzStruct(Material.iron).setBlockName("struct_watz_core").setLightLevel(1F).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":struct_watz_core");
|
struct_watz_core = new BlockWatzStruct(Material.iron).setBlockName("struct_watz_core").setLightLevel(1F).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":struct_watz_core");
|
||||||
struct_icf_core = new BlockICFStruct(Material.iron).setBlockName("struct_icf_core").setLightLevel(1F).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":struct_icf_core");
|
struct_icf_core = new BlockICFStruct(Material.iron).setBlockName("struct_icf_core").setLightLevel(1F).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":struct_icf_core");
|
||||||
|
|
||||||
factory_titanium_hull = new BlockGeneric(Material.iron).setBlockName("factory_titanium_hull").setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":factory_titanium_hull");
|
|
||||||
factory_advanced_hull = new BlockGeneric(Material.iron).setBlockName("factory_advanced_hull").setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":factory_advanced_hull");
|
|
||||||
|
|
||||||
cm_block = new BlockCM(Material.iron, EnumCMMaterials.class, true, true).setBlockName("cm_block").setCreativeTab(MainRegistry.machineTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":cm_block");
|
cm_block = new BlockCM(Material.iron, EnumCMMaterials.class, true, true).setBlockName("cm_block").setCreativeTab(MainRegistry.machineTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":cm_block");
|
||||||
cm_sheet = new BlockCM(Material.iron, EnumCMMaterials.class, true, true).setBlockName("cm_sheet").setCreativeTab(MainRegistry.machineTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":cm_sheet");
|
cm_sheet = new BlockCM(Material.iron, EnumCMMaterials.class, true, true).setBlockName("cm_sheet").setCreativeTab(MainRegistry.machineTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":cm_sheet");
|
||||||
cm_engine = new BlockCM(Material.iron, EnumCMEngines.class, true, true).setBlockName("cm_engine").setCreativeTab(MainRegistry.machineTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":cm_engine");
|
cm_engine = new BlockCM(Material.iron, EnumCMEngines.class, true, true).setBlockName("cm_engine").setCreativeTab(MainRegistry.machineTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":cm_engine");
|
||||||
@ -2296,7 +2279,6 @@ public class ModBlocks {
|
|||||||
gas_coal = new BlockGasCoal().setBlockName("gas_coal").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_coal");
|
gas_coal = new BlockGasCoal().setBlockName("gas_coal").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_coal");
|
||||||
gas_flammable = new BlockGasFlammable().setBlockName("gas_flammable").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_flammable");
|
gas_flammable = new BlockGasFlammable().setBlockName("gas_flammable").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_flammable");
|
||||||
gas_explosive = new BlockGasExplosive().setBlockName("gas_explosive").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_explosive");
|
gas_explosive = new BlockGasExplosive().setBlockName("gas_explosive").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_explosive");
|
||||||
vacuum = new BlockVacuum().setBlockName("vacuum").setResistance(1000000F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vacuum");
|
|
||||||
|
|
||||||
rad_absorber = new BlockAbsorber(Material.iron).setBlockName("rad_absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
rad_absorber = new BlockAbsorber(Material.iron).setBlockName("rad_absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
decon = new BlockDecon(Material.iron).setBlockName("decon").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":decon_side");
|
decon = new BlockDecon(Material.iron).setBlockName("decon").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":decon_side");
|
||||||
@ -2606,6 +2588,7 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(bobblehead, ItemBlockMeta.class, bobblehead.getUnlocalizedName());
|
GameRegistry.registerBlock(bobblehead, ItemBlockMeta.class, bobblehead.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(snowglobe, ItemBlockMeta.class, snowglobe.getUnlocalizedName());
|
GameRegistry.registerBlock(snowglobe, ItemBlockMeta.class, snowglobe.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(plushie, ItemBlockBase.class, plushie.getUnlocalizedName());
|
GameRegistry.registerBlock(plushie, ItemBlockBase.class, plushie.getUnlocalizedName());
|
||||||
|
register(vending_machine);
|
||||||
GameRegistry.registerBlock(deco_rbmk, deco_rbmk.getUnlocalizedName());
|
GameRegistry.registerBlock(deco_rbmk, deco_rbmk.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(deco_rbmk_smooth, deco_rbmk_smooth.getUnlocalizedName());
|
GameRegistry.registerBlock(deco_rbmk_smooth, deco_rbmk_smooth.getUnlocalizedName());
|
||||||
|
|
||||||
@ -3209,20 +3192,14 @@ public class ModBlocks {
|
|||||||
|
|
||||||
GameRegistry.registerBlock(chain, chain.getUnlocalizedName());
|
GameRegistry.registerBlock(chain, chain.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(ladder_sturdy, ladder_sturdy.getUnlocalizedName());
|
GameRegistry.registerBlock(ladder_sturdy, ladder_sturdy.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(ladder_iron, ladder_iron.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(ladder_gold, ladder_gold.getUnlocalizedName());
|
GameRegistry.registerBlock(ladder_gold, ladder_gold.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(ladder_titanium, ladder_titanium.getUnlocalizedName());
|
GameRegistry.registerBlock(ladder_titanium, ladder_titanium.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(ladder_copper, ladder_copper.getUnlocalizedName());
|
GameRegistry.registerBlock(ladder_copper, ladder_copper.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(ladder_tungsten, ladder_tungsten.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(ladder_aluminium, ladder_aluminium.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(ladder_steel, ladder_steel.getUnlocalizedName());
|
GameRegistry.registerBlock(ladder_steel, ladder_steel.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(ladder_lead, ladder_lead.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(ladder_cobalt, ladder_cobalt.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(trapdoor_steel, trapdoor_steel.getUnlocalizedName());
|
GameRegistry.registerBlock(trapdoor_steel, trapdoor_steel.getUnlocalizedName());
|
||||||
|
|
||||||
register(barrel_plastic);
|
register(barrel_plastic);
|
||||||
register(barrel_corroded);
|
register(barrel_corroded);
|
||||||
register(barrel_iron);
|
|
||||||
register(barrel_steel);
|
register(barrel_steel);
|
||||||
register(barrel_tcalloy);
|
register(barrel_tcalloy);
|
||||||
register(barrel_antimatter);
|
register(barrel_antimatter);
|
||||||
@ -3335,10 +3312,6 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(machine_solar_boiler, machine_solar_boiler.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_solar_boiler, machine_solar_boiler.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(solar_mirror, solar_mirror.getUnlocalizedName());
|
GameRegistry.registerBlock(solar_mirror, solar_mirror.getUnlocalizedName());
|
||||||
|
|
||||||
//Literal fucking garbage
|
|
||||||
GameRegistry.registerBlock(factory_titanium_hull, factory_titanium_hull.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(factory_advanced_hull, factory_advanced_hull.getUnlocalizedName());
|
|
||||||
|
|
||||||
//CM stuff
|
//CM stuff
|
||||||
register(custom_machine, ItemCustomMachine.class);
|
register(custom_machine, ItemCustomMachine.class);
|
||||||
register(cm_block);
|
register(cm_block);
|
||||||
@ -3489,7 +3462,6 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(gas_coal, gas_coal.getUnlocalizedName());
|
GameRegistry.registerBlock(gas_coal, gas_coal.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(gas_flammable, gas_flammable.getUnlocalizedName());
|
GameRegistry.registerBlock(gas_flammable, gas_flammable.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(gas_explosive, gas_explosive.getUnlocalizedName());
|
GameRegistry.registerBlock(gas_explosive, gas_explosive.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(vacuum, vacuum.getUnlocalizedName());
|
|
||||||
|
|
||||||
// OC Compat Items
|
// OC Compat Items
|
||||||
if(Loader.isModLoaded(Compat.MOD_OC)) {
|
if(Loader.isModLoaded(Compat.MOD_OC)) {
|
||||||
|
|||||||
@ -1,137 +0,0 @@
|
|||||||
package com.hbm.blocks.gas;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
|
||||||
import com.hbm.lib.ModDamageSource;
|
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
|
||||||
import net.minecraft.world.IBlockAccess;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
|
||||||
|
|
||||||
public class BlockVacuum extends Block {
|
|
||||||
|
|
||||||
public BlockVacuum() {
|
|
||||||
super(ModBlocks.materialGas);
|
|
||||||
this.setHardness(0.0F);
|
|
||||||
this.setResistance(0.0F);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isOpaqueCube() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getRenderType() {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean renderAsNormalBlock() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canCollideCheck(int p_149678_1_, boolean p_149678_2_) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isReplaceable(IBlockAccess world, int x, int y, int z) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBlockAdded(World world, int x, int y, int z) {
|
|
||||||
if(!world.isRemote) world.scheduleBlockUpdate(x, y, z, this, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
|
||||||
if(!world.isRemote) world.scheduleBlockUpdate(x, y, z, this, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
|
||||||
|
|
||||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
|
||||||
|
|
||||||
Block b = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
|
||||||
|
|
||||||
if(b == this)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if(isAirBlock(b)) {
|
|
||||||
|
|
||||||
if(b.isReplaceable(world, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ)) {
|
|
||||||
if(getAirCount(world, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) == 0) {
|
|
||||||
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.vacuum);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
world.setBlockToAir(x, y, z);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isAirBlock(Block b) {
|
|
||||||
|
|
||||||
if(b == this)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return b.getMaterial() == Material.air ||
|
|
||||||
b.getBlockBoundsMinX() > 0 || b.getBlockBoundsMinY() > 0 || b.getBlockBoundsMinZ() > 0 ||
|
|
||||||
b.getBlockBoundsMaxX() < 1 || b.getBlockBoundsMaxY() < 1 || b.getBlockBoundsMaxZ() < 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
private int getAirCount(World world, int x, int y, int z) {
|
|
||||||
|
|
||||||
int air = 0;
|
|
||||||
|
|
||||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
|
||||||
|
|
||||||
Block b = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
|
||||||
|
|
||||||
if(isAirBlock(b))
|
|
||||||
air++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return air;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) {
|
|
||||||
|
|
||||||
if(!(entity instanceof EntityLivingBase))
|
|
||||||
return;
|
|
||||||
|
|
||||||
entity.attackEntityFrom(ModDamageSource.vacuum, 1F);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -47,28 +47,18 @@ public class BlockFluidBarrel extends BlockContainer implements ITooltipProvider
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||||
|
if(this == ModBlocks.barrel_corroded) return null;
|
||||||
return new TileEntityBarrel(capacity);
|
return new TileEntityBarrel(capacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||||
|
@Override public int getRenderType(){ return renderID; }
|
||||||
@Override
|
@Override public boolean isOpaqueCube() { return false; }
|
||||||
public int getRenderType(){
|
@Override public boolean renderAsNormalBlock() { return false; }
|
||||||
return renderID;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isOpaqueCube() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean renderAsNormalBlock() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
|
if(this == ModBlocks.barrel_corroded) return false;
|
||||||
if(world.isRemote) {
|
if(world.isRemote) {
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -111,6 +101,8 @@ public class BlockFluidBarrel extends BlockContainer implements ITooltipProvider
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) {
|
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) {
|
||||||
|
if(this == ModBlocks.barrel_corroded) return;
|
||||||
|
|
||||||
if(!keepInventory) {
|
if(!keepInventory) {
|
||||||
ISidedInventory tileentityfurnace = (ISidedInventory) p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
ISidedInventory tileentityfurnace = (ISidedInventory) p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
||||||
|
|
||||||
@ -187,12 +179,8 @@ public class BlockFluidBarrel extends BlockContainer implements ITooltipProvider
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getComparatorInputOverride(World world, int x, int y, int z, int side) {
|
public int getComparatorInputOverride(World world, int x, int y, int z, int side) {
|
||||||
|
|
||||||
TileEntity te = world.getTileEntity(x, y, z);
|
TileEntity te = world.getTileEntity(x, y, z);
|
||||||
|
if(!(te instanceof TileEntityBarrel)) return 0;
|
||||||
if(!(te instanceof TileEntityBarrel))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
TileEntityBarrel barrel = (TileEntityBarrel) te;
|
TileEntityBarrel barrel = (TileEntityBarrel) te;
|
||||||
return barrel.getComparatorPower();
|
return barrel.getComparatorPower();
|
||||||
}
|
}
|
||||||
@ -222,13 +210,6 @@ public class BlockFluidBarrel extends BlockContainer implements ITooltipProvider
|
|||||||
list.add(EnumChatFormatting.RED + "Leaky");
|
list.add(EnumChatFormatting.RED + "Leaky");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this == ModBlocks.barrel_iron) {
|
|
||||||
list.add(EnumChatFormatting.AQUA + "Capacity: 8,000mB");
|
|
||||||
list.add(EnumChatFormatting.GREEN + "Can store hot fluids");
|
|
||||||
list.add(EnumChatFormatting.YELLOW + "Cannot store corrosive fluids properly");
|
|
||||||
list.add(EnumChatFormatting.YELLOW + "Cannot store antimatter");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this == ModBlocks.barrel_steel) {
|
if(this == ModBlocks.barrel_steel) {
|
||||||
list.add(EnumChatFormatting.AQUA + "Capacity: 16,000mB");
|
list.add(EnumChatFormatting.AQUA + "Capacity: 16,000mB");
|
||||||
list.add(EnumChatFormatting.GREEN + "Can store hot fluids");
|
list.add(EnumChatFormatting.GREEN + "Can store hot fluids");
|
||||||
|
|||||||
122
src/main/java/com/hbm/blocks/machine/BlockVendingMachine.java
Normal file
122
src/main/java/com/hbm/blocks/machine/BlockVendingMachine.java
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.blocks.IBlockMulti;
|
||||||
|
import com.hbm.itempool.ItemPool;
|
||||||
|
import com.hbm.itempool.ItemPoolsVendingMachine;
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
|
import com.hbm.main.NTMSounds;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.entity.item.EntityItem;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class BlockVendingMachine extends BlockDummyable implements IBlockMulti {
|
||||||
|
|
||||||
|
public BlockVendingMachine() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityVendingMachine();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public int getSubCount() { return 2; }
|
||||||
|
|
||||||
|
@Override public int[] getDimensions() { return new int[] {1, 0, 0, 0, 0, 0}; }
|
||||||
|
@Override public int getOffset() { return 0; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
|
|
||||||
|
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.coin_token) {
|
||||||
|
player.getHeldItem().stackSize--;
|
||||||
|
|
||||||
|
if(world.isRemote) return true;
|
||||||
|
|
||||||
|
int dmg = 0;
|
||||||
|
int meta = 0;
|
||||||
|
int[] pos = this.findCore(world, x, y, z);
|
||||||
|
if(pos != null) {
|
||||||
|
meta = world.getBlockMetadata(pos[0], pos[1], pos[2]);
|
||||||
|
if(world.getBlockMetadata(pos[0], pos[1] + 1, pos[2]) >= 6) dmg = 1;
|
||||||
|
|
||||||
|
ItemStack toDrop = null;
|
||||||
|
|
||||||
|
if(dmg == 0) toDrop = ItemPool.getStack(ItemPoolsVendingMachine.POOL_SODA, world.rand);
|
||||||
|
if(dmg == 1) toDrop = ItemPool.getStack(ItemPoolsVendingMachine.POOL_SNACKS, world.rand);
|
||||||
|
|
||||||
|
if(toDrop != null) {
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(meta - 10);
|
||||||
|
EntityItem item = new EntityItem(world, x + 0.5 + dir.offsetX * 0.75, pos[1] + 0.25, z + 0.5 + dir.offsetZ * 0.75, toDrop);
|
||||||
|
world.spawnEntityInWorld(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, NTMSounds.GUN_BOLT_OPEN, 1F, 0.75F);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||||
|
super.onBlockPlacedBy(world, x, y, z, player, stack);
|
||||||
|
|
||||||
|
if(stack.getItemDamage() % 2 == 1 && world.getBlock(x, y + 1, z) == this) {
|
||||||
|
this.makeExtra(world, x, y + 1, z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||||
|
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||||
|
int[] pos = this.findCore(world, x, y, z);
|
||||||
|
int dmg = 0;
|
||||||
|
if(pos != null) {
|
||||||
|
if(world.getBlockMetadata(pos[0], pos[1] + 1, pos[2]) >= 6) dmg = 1;
|
||||||
|
}
|
||||||
|
ret.add(new ItemStack(this, 1, dmg));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||||
|
for(int i = 0; i < getSubCount(); ++i) list.add(new ItemStack(item, 1, i));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class TileEntityVendingMachine extends TileEntity {
|
||||||
|
|
||||||
|
AxisAlignedBB bb = null;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AxisAlignedBB getRenderBoundingBox() {
|
||||||
|
if(bb == null) bb = AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 2, zCoord + 1);
|
||||||
|
return bb;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public double getMaxRenderDistanceSquared() {
|
||||||
|
return 65536.0D;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -21,6 +21,7 @@ public class ServerConfig extends RunningConfig {
|
|||||||
public static ConfigWrapper<Boolean> CRATE_KEEP_CONTENTS = new ConfigWrapper(true);
|
public static ConfigWrapper<Boolean> CRATE_KEEP_CONTENTS = new ConfigWrapper(true);
|
||||||
public static ConfigWrapper<Integer> ITEM_HAZARD_DROP_TICKRATE = new ConfigWrapper(2);
|
public static ConfigWrapper<Integer> ITEM_HAZARD_DROP_TICKRATE = new ConfigWrapper(2);
|
||||||
public static ConfigWrapper<Boolean> ENABLE_MKU = new ConfigWrapper(true);
|
public static ConfigWrapper<Boolean> ENABLE_MKU = new ConfigWrapper(true);
|
||||||
|
public static ConfigWrapper<Integer> AUTOCAL_MAX_CLOCK = new ConfigWrapper(20);
|
||||||
|
|
||||||
private static void initDefaults() {
|
private static void initDefaults() {
|
||||||
configMap.put("DAMAGE_COMPATIBILITY_MODE", DAMAGE_COMPATIBILITY_MODE);
|
configMap.put("DAMAGE_COMPATIBILITY_MODE", DAMAGE_COMPATIBILITY_MODE);
|
||||||
@ -34,6 +35,7 @@ public class ServerConfig extends RunningConfig {
|
|||||||
configMap.put("CRATE_KEEP_CONTENTS", CRATE_KEEP_CONTENTS);
|
configMap.put("CRATE_KEEP_CONTENTS", CRATE_KEEP_CONTENTS);
|
||||||
configMap.put("ITEM_HAZARD_DROP_TICKRATE", ITEM_HAZARD_DROP_TICKRATE);
|
configMap.put("ITEM_HAZARD_DROP_TICKRATE", ITEM_HAZARD_DROP_TICKRATE);
|
||||||
configMap.put("ENABLE_MKU", ENABLE_MKU);
|
configMap.put("ENABLE_MKU", ENABLE_MKU);
|
||||||
|
configMap.put("AUTOCAL_MAX_CLOCK", AUTOCAL_MAX_CLOCK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */
|
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */
|
||||||
|
|||||||
@ -42,6 +42,9 @@ public class BobmazonOfferFactory {
|
|||||||
//blueprints
|
//blueprints
|
||||||
standard.add(new Offer(new ItemStack(ModItems.blueprint_folder, 1, 0), Requirement.ASSEMBLY, 64));
|
standard.add(new Offer(new ItemStack(ModItems.blueprint_folder, 1, 0), Requirement.ASSEMBLY, 64));
|
||||||
standard.add(new Offer(new ItemStack(ModItems.blueprint_folder, 1, 1), Requirement.OIL, 256));
|
standard.add(new Offer(new ItemStack(ModItems.blueprint_folder, 1, 1), Requirement.OIL, 256));
|
||||||
|
//vending machines
|
||||||
|
standard.add(new Offer(new ItemStack(ModBlocks.vending_machine, 1, 0), Requirement.CHEMICS, 64));
|
||||||
|
standard.add(new Offer(new ItemStack(ModBlocks.vending_machine, 1, 1), Requirement.CHEMICS, 64));
|
||||||
//plants
|
//plants
|
||||||
standard.add(new Offer(new ItemStack(Blocks.sapling, 1, 3), Requirement.STEEL, 12, 9));
|
standard.add(new Offer(new ItemStack(Blocks.sapling, 1, 3), Requirement.STEEL, 12, 9));
|
||||||
standard.add(new Offer(new ItemStack(ModBlocks.plant_flower, 1, EnumFlowerType.FOXGLOVE.ordinal()), Requirement.STEEL, 16, 5));
|
standard.add(new Offer(new ItemStack(ModBlocks.plant_flower, 1, EnumFlowerType.FOXGLOVE.ordinal()), Requirement.STEEL, 16, 5));
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.hbm.inventory.gui;
|
|||||||
|
|
||||||
import java.awt.Desktop;
|
import java.awt.Desktop;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.PrintWriter;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
@ -27,7 +28,7 @@ public class GUIScreenRadioAUTOCAL extends GuiScreen {
|
|||||||
protected static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_rtty_autocal.png");
|
protected static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_rtty_autocal.png");
|
||||||
protected TileEntityRadioAUTOCAL autocal;
|
protected TileEntityRadioAUTOCAL autocal;
|
||||||
|
|
||||||
protected int xSize = 150;
|
protected int xSize = 170;
|
||||||
protected int ySize = 90;
|
protected int ySize = 90;
|
||||||
protected int guiLeft;
|
protected int guiLeft;
|
||||||
protected int guiTop;
|
protected int guiTop;
|
||||||
@ -74,6 +75,24 @@ public class GUIScreenRadioAUTOCAL extends GuiScreen {
|
|||||||
} catch(Throwable ex) { MainRegistry.logger.error("Couldn't open link", ex); }
|
} catch(Throwable ex) { MainRegistry.logger.error("Couldn't open link", ex); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// open folder and generate new doc file
|
||||||
|
if(checkClick(x, y, 144, 36, 18, 18)) {
|
||||||
|
try {
|
||||||
|
File uploadFolder = new File(MainRegistry.configDir.getParentFile(), "hbmComputerUpload");
|
||||||
|
File doc = new File(uploadFolder, "documentation.md");
|
||||||
|
if(!uploadFolder.exists()) uploadFolder.mkdir();
|
||||||
|
if(!doc.exists()) {
|
||||||
|
doc.createNewFile();
|
||||||
|
try {
|
||||||
|
PrintWriter printer = new PrintWriter(doc, StandardCharsets.US_ASCII.name());
|
||||||
|
for(String line : DOCS) printer.println(line);
|
||||||
|
printer.close();
|
||||||
|
} catch(Throwable e) { }
|
||||||
|
}
|
||||||
|
Desktop.getDesktop().browse(doc.toURI());
|
||||||
|
} catch(Throwable ex) { MainRegistry.logger.error("Couldn't open link", ex); }
|
||||||
|
}
|
||||||
|
|
||||||
if(checkClick(x, y, 84, 36, 18, 18)) {
|
if(checkClick(x, y, 84, 36, 18, 18)) {
|
||||||
try {
|
try {
|
||||||
File uploadFolder = new File(MainRegistry.configDir.getParentFile(), "hbmComputerUpload");
|
File uploadFolder = new File(MainRegistry.configDir.getParentFile(), "hbmComputerUpload");
|
||||||
@ -132,6 +151,7 @@ public class GUIScreenRadioAUTOCAL extends GuiScreen {
|
|||||||
if(checkClick(x, y, 84, 36, 18, 18)) this.func_146283_a(Arrays.asList(new String[] {EnumChatFormatting.BLUE + "Upload Program"}), x, y);
|
if(checkClick(x, y, 84, 36, 18, 18)) this.func_146283_a(Arrays.asList(new String[] {EnumChatFormatting.BLUE + "Upload Program"}), x, y);
|
||||||
if(checkClick(x, y, 104, 36, 18, 18)) this.func_146283_a(Arrays.asList(new String[] {EnumChatFormatting.BLUE + "Open Program File"}), x, y);
|
if(checkClick(x, y, 104, 36, 18, 18)) this.func_146283_a(Arrays.asList(new String[] {EnumChatFormatting.BLUE + "Open Program File"}), x, y);
|
||||||
if(checkClick(x, y, 124, 36, 18, 18)) this.func_146283_a(Arrays.asList(new String[] {EnumChatFormatting.BLUE + "Download Program", EnumChatFormatting.RED + "Currently unsupported!"}), x, y);
|
if(checkClick(x, y, 124, 36, 18, 18)) this.func_146283_a(Arrays.asList(new String[] {EnumChatFormatting.BLUE + "Download Program", EnumChatFormatting.RED + "Currently unsupported!"}), x, y);
|
||||||
|
if(checkClick(x, y, 144, 36, 18, 18)) this.func_146283_a(Arrays.asList(new String[] {EnumChatFormatting.BLUE + "Open Documentation"}), x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
|
private void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
|
||||||
@ -139,9 +159,9 @@ public class GUIScreenRadioAUTOCAL extends GuiScreen {
|
|||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||||
|
|
||||||
if(autocal.isOn) drawTexturedModalRect(guiLeft + 8, guiTop + 36, 150, 0, 18, 18);
|
if(autocal.isOn) drawTexturedModalRect(guiLeft + 8, guiTop + 36, xSize, 0, 18, 18);
|
||||||
if(!autocal.ignoreError) drawTexturedModalRect(guiLeft + 28, guiTop + 36, 150, 18, 18, 18);
|
if(!autocal.ignoreError) drawTexturedModalRect(guiLeft + 28, guiTop + 36, xSize, 18, 18, 18);
|
||||||
if(!autocal.autoReboot) drawTexturedModalRect(guiLeft + 48, guiTop + 36, 150, 36, 18, 18);
|
if(!autocal.autoReboot) drawTexturedModalRect(guiLeft + 48, guiTop + 36, xSize, 36, 18, 18);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -152,4 +172,257 @@ public class GUIScreenRadioAUTOCAL extends GuiScreen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean doesGuiPauseGame() { return false; }
|
@Override public boolean doesGuiPauseGame() { return false; }
|
||||||
|
|
||||||
|
|
||||||
|
public static final String[] DOCS = new String[] {
|
||||||
|
"# AUTOCAL - The Automatic Calculator",
|
||||||
|
"",
|
||||||
|
"## About this document",
|
||||||
|
"This documentation is designed to be understandable even by people with no programming background. This documentation extends to the AUTOCAL unit as well as the MS-ES1 script language it is programmed with.",
|
||||||
|
"",
|
||||||
|
"Read this document carefully as all the described concepts are vital for using the AUTOCAL unit.",
|
||||||
|
"",
|
||||||
|
"## About AUTOCAL",
|
||||||
|
"The AUTOCAL automatic calculator is a basic machine that reads a script, line by line, and performs actions based on those lines. This means it can be programmed with behavior, doing math, and handling signals. It communicated with the outside world exclusively using Redstone-over-Radio (RoR) signals, allowing RoR to supply it with values to be processed, and returning RoR signals to be displayed or for controlling RoR receiving devices.",
|
||||||
|
"",
|
||||||
|
"The first button is the on/off switch. Turning the AUTOCAL unit on will start the script at the first line. If the script concludes, an error is encountered (without the \"ignore errors\" setting enabled), the `shutdown` command is used or no program is loaded to begin with, the unit will automatically power down.",
|
||||||
|
"",
|
||||||
|
"The second button is the \"ignore errors\" setting. The red X means the setting is disabled, if an error is encountered in the program (an unrecognized command, missing or incorrect parameters, anything the script isn't meant to handle) then the unit will shut off. Otherwise, the erroring instruction is simply skipped. This may cause undefined or unexpected behavior, however in certain circumstances this doesn't matter. It's advised to keep this turned off, as it makes it easier to find obvious errors in the script.",
|
||||||
|
"",
|
||||||
|
"The third button is the \"automatic reboot\" setting. If the unit is powered down, no matter the reason, it will automatically try to start again. This allows for a simple \"loop\" where the same script is repeated every time it ends by simply rebooting the AUTOCAL unit at the end. Do note that doing so will delete all saved variables, more on how variables work later.",
|
||||||
|
"",
|
||||||
|
"The fourth button is for uploading the script. The script is in the minecraft's install folder, under the `hbmComputerUpload` folder, named `script.txt`. Clicking this button will send the contents of this script file to the AUTOCAL unit.",
|
||||||
|
"",
|
||||||
|
"The fifth button is for opening the script file. If no script file exists yet, the folder and empty script will be created.",
|
||||||
|
"",
|
||||||
|
"The sixth button is for downloading a script file. The existing `script.txt` is deleted and replaced with the script that is loaded onto the AUTOCAL unit.",
|
||||||
|
"",
|
||||||
|
"The simple workflow of programming an AUTOCAL unit is therefore using button #5 to open the file, writing the program, using #4 to flash the program to the AUTOCAL unit, and then using the first button to turn it on.",
|
||||||
|
"",
|
||||||
|
"## About MS-ES1",
|
||||||
|
"The script read by AUTOCAL units is written in *Machine Script - Equestrian Standard, Version 1*, or MS-ES1. MS-ES1 features named variables, value comparison, (conditional) jumping, evaluation of mathematical expressions and reading/writing of RoR signals. The speed at which lines are processed is defined by the *clock speed*, which can be defined in the script. The amount describes the number of lines processed per tick, i.e. the default clock speed of 1 means 20 lines are processed per second (there are 20 ticks in one second). The maximum clock speed is determined by the server config value `AUTOCAL_MAX_CLOCK` (default is 20, i.e. 400 per second).",
|
||||||
|
"",
|
||||||
|
"Example: `/ntmserver set AUTOCAL_MAX_CLOCK 10` -> Sets the max clock speed to 10.",
|
||||||
|
"",
|
||||||
|
"## About the Buffer",
|
||||||
|
"The buffer is a single \"slot\" of information that can be used for many commands. Some commands produce an output which is saved to the buffer, some commands modify the contents of the buffer, and some commands use the buffer's contents. The buffer's contents can also be saved permanently as a named variable, and named variables can be written back into the buffer again if needed. The buffer persists as long as the AUTOCAL unit is running, should it restart or shut down, the buffer's contents are lost.",
|
||||||
|
"",
|
||||||
|
"## About Variables",
|
||||||
|
"MS-ES1 allows named variables to be saved for later use. There is no limit to how many variables can be saved. All variables are text (\"Strings\"), however depending on the command and context, that text may be interpreted as a number (both full and decimal). Variables, much like the buffer, are also stored as long as the program is running, if the AUTOCAL unit shuts down, all stored variables are lost.",
|
||||||
|
"",
|
||||||
|
"## About Variable Substitution",
|
||||||
|
"Many commands allow for *variable substitution*, i.e. a specific format can be used to insert the contents of a variable (or multiple!) into a parameter. This allows for the quick use of variables, or multiple variables in the same statement. Substitution is defined by `$variable name$`, where this text is replaced with the value of a variable called \"variable name\".",
|
||||||
|
"",
|
||||||
|
"Example: `eval $val1$ + $val2$` assuming `val1` is 4 and `val2` is 8 would resolve to `eval 4 + 8`.",
|
||||||
|
"",
|
||||||
|
"Special case: The contents of the buffer can also be accessed using substitution using `$buffer$`. Consequently, a variable also named \"buffer\" can **not** be accessed using variable substitution at all.",
|
||||||
|
"",
|
||||||
|
"## About Redstone-over-Radio",
|
||||||
|
"RoR has a specific limitation: A signal cannot be sent on the same channel within the same game tick. Subsequent signals on the same channel in the same tick will overwrite the previous one, with the exception of numeric (whole number) signals which are added together (e.g. sending \"5\" and \"7\" in the same tick creates a signal \"12\"). Since the AUTOCAL unit's clock speed allows it to theoretically send multiple signals on the same channel on the same tick, it might be necessary to *end* the operation for this tick even though there's still clock cycles left to do. This can be done with the `endtick` command.",
|
||||||
|
"",
|
||||||
|
"## The Script (Commands)",
|
||||||
|
"",
|
||||||
|
"### Comments",
|
||||||
|
"Lines that start with `# ` (hashtag + space) are comments, and therefore ignored. If the AUTOCAL encounters such a line, it is skipped, not using up the clock cycle.",
|
||||||
|
"",
|
||||||
|
"Example: `# This is a comment` -> A line that does nothing, but can still be useful to explain and annotate other commands.",
|
||||||
|
"",
|
||||||
|
"### nop",
|
||||||
|
"`nop` (no operation) is an operation that consumes one clock cycle, but does not have any other effect. This is only useful in special cases where clock cycle timing is somehow important.",
|
||||||
|
"",
|
||||||
|
"### clockspeed",
|
||||||
|
"`clockspeed <speed>` sets the AUTOCAL's clock speed (i.e. amount of lines processed per tick). This can be changed at any point in the script, but usually it is most useful to start the script by defining the clock speed.",
|
||||||
|
"",
|
||||||
|
"Example: `clockspeed 5` -> Sets the AUTOCAL's clock speed to five lines per tick (100 lines per second).",
|
||||||
|
"",
|
||||||
|
"### dest",
|
||||||
|
"`dest <name>` creates a jump destination. Using the various jumping conditions, we can cause the AUTOCAL to return back (or forward) to this point. If a destination is reached not by jumping but simply by reading the next line, it will not use up a clock cycle, just like a comment. Destinations need unique names, if multiple destinations exist with the same name, then the latter ones will overwrite the former ones.",
|
||||||
|
"",
|
||||||
|
"Example: `dest start` -> Creates a destination point named \"start\", any jump instruction using \"start\" will cause the script to return to this point.",
|
||||||
|
"",
|
||||||
|
"### jmp",
|
||||||
|
"`jmp <destination>` will cause the program to skip to the destination with the supplied name. The jump will always be performed when the script reaches this instruction. Supports variable substitution!",
|
||||||
|
"",
|
||||||
|
"Example: `jmp start` -> Jumps to the destination point named \"start\".",
|
||||||
|
"Example: `jmp $dest$` -> Jumps to the destination point with the same name as the contents of the variable \"dest\".",
|
||||||
|
"",
|
||||||
|
"### jmpif",
|
||||||
|
"`jmpif <destination>` will cause the program to skip to the destination with the supplied name, if the buffer's content is `true`. Otherwise, the program will just proceed to the next line, like any other instruction. Supports variable substitution!",
|
||||||
|
"",
|
||||||
|
"Example:",
|
||||||
|
"`jmpif skip`",
|
||||||
|
"`nop`",
|
||||||
|
"`dest skip`",
|
||||||
|
"`nop`",
|
||||||
|
"",
|
||||||
|
"-> If the buffer is `true`, then the program will jump to the destination point named \"skip\" and only run the second `nop`. Otherwise, both the first and second `nop` will run.",
|
||||||
|
"",
|
||||||
|
"### jmpnot",
|
||||||
|
"`jmpnot <destination>` will cause the program to skip to the destination with the supplied name, if the buffer's content is **not** `true`. This is basically the inverse of `jmpif`. Only exists for some convenience for people who are used to more traditional languages' `if` statements. Supports variable substitution!",
|
||||||
|
"",
|
||||||
|
"Example:",
|
||||||
|
"`jmpnot skip` <- if",
|
||||||
|
"`nop` <- then",
|
||||||
|
"`jmp end`",
|
||||||
|
"`dest skip`",
|
||||||
|
"`nop` <- else",
|
||||||
|
"`dest end` <- end",
|
||||||
|
"",
|
||||||
|
"-> By using two jumps, one conditional and one fixed, we can emulate the structure of an `if/else` block. If the buffer's content is `true`, the first `nop` runs. Otherwise, the second `nop` is run. The second jump (`jmp end`) lets us skip over the \"else\" part of the script after running the \"then\" part.",
|
||||||
|
"",
|
||||||
|
"### endtick",
|
||||||
|
"`endtick` stops the script until the next game tick. This is important when sending multiple RoR signals on the same channel in a row, since a channel in the same tick can only hold one signal.",
|
||||||
|
"",
|
||||||
|
"### shutdown",
|
||||||
|
"`shutdown` will turn the AUTOCAL unit off. If the AUTOCAL is set up to automatically reboot, this effectively restarts the script from scratch, voiding all saved variables and the buffer. If not, then the AUTOCAL unit will stay off until manually restarted.",
|
||||||
|
"",
|
||||||
|
"### load",
|
||||||
|
"`load <name>` will take the value of a variable with the supplied name and copy it to the buffer. Many commands work directly out of the buffer, so next to variable substitution, this is the only way of actually accessing the contents of a variable.",
|
||||||
|
"",
|
||||||
|
"Example: `load val` -> Assuming that the variable \"val\" contains the value `5`, then the buffer's value is now overwritten with that `5`.",
|
||||||
|
"",
|
||||||
|
"### save",
|
||||||
|
"`save <name>` will take the value of the buffer and save it to a variable with the supplied name. This is the only way of actually changing variables, and saving values for later use besides the buffer.",
|
||||||
|
"",
|
||||||
|
"Example: `save val` -> Assuming that the buffer contains the value `12`, this will create a new variable named \"val\" with the value of `12`.",
|
||||||
|
"",
|
||||||
|
"### buffer",
|
||||||
|
"`buffer <value>` will write the supplied value directly to the buffer. This means that commands that require buffer values can be supplied with values directly from the code.",
|
||||||
|
"",
|
||||||
|
"Example:",
|
||||||
|
"`buffer Horseshoe`",
|
||||||
|
"`save item`",
|
||||||
|
"",
|
||||||
|
"-> Will buffer the value `Horseshoe` and then save it to the variable called \"item\".",
|
||||||
|
"",
|
||||||
|
"### eval",
|
||||||
|
"`eval [statement]` will evaluate the supplied statement as a mathematical expression. In short, anything NTM's calculator can make sense of (the one you open with N by default), this function can do the same. The statement is optional, if no statement is supplied, then it will try to use the buffer's contents as the statement. `eval` produces **decimal** values and not whole number **integers**, so for use in RoR signals, the output needs to be rounded! The result of the calculation is then saved to the buffer. Supports variable substitution!",
|
||||||
|
"",
|
||||||
|
"Example: `eval 4 + 5` -> Calculates \"4+5\" and saves `9` to the buffer.",
|
||||||
|
"Example: `eval $val$ / 2` -> Takes the value of \"val\" and divides it by 2, saving the result to the buffer.",
|
||||||
|
"",
|
||||||
|
"Example:",
|
||||||
|
"`load calc`",
|
||||||
|
"`eval`",
|
||||||
|
"",
|
||||||
|
"-> Will write the value of \"calc\" to the buffer, and then treat it as a mathematical expression. If we assume \"calc\" to be `5+2` then `eval` will end up writing `7` to the buffer.",
|
||||||
|
"",
|
||||||
|
"### evalr",
|
||||||
|
"`evalr [statement]` is identical to `eval`, however it will round the result to the nearest whole number. Whole numbers are important for RoR, since gauges, numeric displays and logic receivers can only handle whole numbers, and not decimals.",
|
||||||
|
"",
|
||||||
|
"### rounddown / floor",
|
||||||
|
"`rounddown` or `floor` will try to interpret the buffer's content as a decimal, and round it **down** to the next lower integer, writing the result to the buffer again.",
|
||||||
|
"",
|
||||||
|
"Example: `rounddown` -> Assuming the buffer's value is `4.2`, the buffer's new value will be `4`.",
|
||||||
|
"Example: `rounddown` -> Assuming the buffer's value is `4.6`, the buffer's new value will be `4`.",
|
||||||
|
"",
|
||||||
|
"### roundup / ceil",
|
||||||
|
"`roundup` or `ceil` will try to interpret the buffer's content as a decimal, and round it **up** to the next higher integer, writing the result to the buffer again.",
|
||||||
|
"",
|
||||||
|
"Example: `roundup` -> Assuming the buffer's value is `4.2`, the buffer's new value will be `5`.",
|
||||||
|
"Example: `roundup` -> Assuming the buffer's value is `4.6`, the buffer's new value will be `5`.",
|
||||||
|
"",
|
||||||
|
"### round / nearest",
|
||||||
|
"`round` or `nearest` will try to interpret the buffer's content as a decimal, and round it to the **closest** integer, writing the result to the buffer again.",
|
||||||
|
"",
|
||||||
|
"Example: `round` -> Assuming the buffer's value is `4.2`, the buffer's new value will be `4`.",
|
||||||
|
"Example: `round` -> Assuming the buffer's value is `4.6`, the buffer's new value will be `5`.",
|
||||||
|
"",
|
||||||
|
"### concat",
|
||||||
|
"`concat <text>` works similarly to `buffer <text>`, however it accepts variable substitution. This means that the text of multiple variables can be combined.",
|
||||||
|
"",
|
||||||
|
"Example: `concat $first$ and $second$` -> Assuming the variable \"first\" to be `Cats` and \"second\" to be `dogs`, then the result saved to the buffer is `Cats and dogs`.",
|
||||||
|
"",
|
||||||
|
"### eq",
|
||||||
|
"`eq <value>` - equals, will try to compare the buffer to the supplied value. The buffer will be set to `true` if the values are equal and `false` otherwise. Supports variable substitution!",
|
||||||
|
"",
|
||||||
|
"Example: `eq Brick` -> If the buffer is `Brick`, then it is set to `true`, otherwise it becomes `false`.",
|
||||||
|
"Example: `eq $comp$` -> If the buffer's value is equal to the value of the variable \"comp\", then it is set to `true`, otherwise it becomes `false`.",
|
||||||
|
"",
|
||||||
|
"### gtb",
|
||||||
|
"`gtb <value>` - greater than buffer, will try to compare the buffer to the supplied value. The buffer will be set to `true` if the supplied numerical value is greater and `false` otherwise. Supports variable substitution!",
|
||||||
|
"",
|
||||||
|
"Example: `gtb 4` -> If the buffer is `3` or lower, then it is set to `true`, otherwise it becomes `false`.",
|
||||||
|
"Example: `gtb $comp$` -> If the buffer lower than the value of \"comp\", then it is set to `true`, otherwise it becomes `false`.",
|
||||||
|
"",
|
||||||
|
"### ltb",
|
||||||
|
"`ltb <value>` - less than buffer, will try to compare the buffer to the supplied value. The buffer will be set to `true` if the supplied numerical value is lower and `false` otherwise. Supports variable substitution!",
|
||||||
|
"",
|
||||||
|
"Example: `ltb 4` -> If the buffer is `5` or higher, then it is set to `true`, otherwise it becomes `false`.",
|
||||||
|
"Example: `ltb $comp$` -> If the buffer higher than the value of \"comp\", then it is set to `true`, otherwise it becomes `false`.",
|
||||||
|
"",
|
||||||
|
"### geb",
|
||||||
|
"`geb <value>` - greater than or equal buffer.",
|
||||||
|
"",
|
||||||
|
"### leb",
|
||||||
|
"`leb <value>` - less than or equal buffer.",
|
||||||
|
"",
|
||||||
|
"### send",
|
||||||
|
"`send <channel>` will send a Redstone-over-Radio signal over the supplied channel, with the signal's value being the current buffer's value. Sending repeatedly over the same channel requires waiting for a full game tick, so using `endtick` after sending is advised. Supports variable substitution!",
|
||||||
|
"",
|
||||||
|
"Example:",
|
||||||
|
"`buffer Hello!`",
|
||||||
|
"`send transmission`",
|
||||||
|
"",
|
||||||
|
"-> Will send the RoR signal `Hello!` on the channel \"transmission\".",
|
||||||
|
"",
|
||||||
|
"Example:",
|
||||||
|
"`buffer SOS`",
|
||||||
|
"`send $target$`",
|
||||||
|
"",
|
||||||
|
"-> Will send the RoR signal \"SOS\" to the channel saved in the variable \"target\".",
|
||||||
|
"",
|
||||||
|
"### listen ",
|
||||||
|
"`listen <channel>` will listen in on the supplied RoR channel and write the signal to the buffer. Will detect all signals, even expired ones, and one just ones sent in the previous tick, so picking up a signal doesn't mean it's new information. Supports variable substitution!",
|
||||||
|
"",
|
||||||
|
"Example:",
|
||||||
|
"`listen input`",
|
||||||
|
"`eval $buffer$ * 100`",
|
||||||
|
"`send output`",
|
||||||
|
"",
|
||||||
|
"-> Will take the signal from the RoR channel \"input\", multiply it by 100, and send that value on the channel \"output\".",
|
||||||
|
"",
|
||||||
|
"## Advanced",
|
||||||
|
"",
|
||||||
|
"### Conditional Branches",
|
||||||
|
"Basic if/else conditions are the bread and butter of most programming. If we want to change the behavior based on different values, we need to compare, and then conditional jump.",
|
||||||
|
"",
|
||||||
|
"This example creates a script that processed a number \"val\" based on how high it is. 4 and below are multiplied by 2, otherwise it is divided by 2:",
|
||||||
|
"",
|
||||||
|
"`buffer 4` <- buffer `4` for comparison",
|
||||||
|
"`gtb $val$` <- is \"val\" greater than our buffer?",
|
||||||
|
"`jmpnot else` <- if not, jump to \"else\"",
|
||||||
|
"`eval $val$ / 2` <- if it is, divide by 2",
|
||||||
|
"`save val` <- ...and save to \"val\"",
|
||||||
|
"`jmp end` <- now jump to \"end\" to skip our \"else\" block",
|
||||||
|
"`dest else` <- else...",
|
||||||
|
"`eval $val$ * 2` <- multiply by 2",
|
||||||
|
"`save val` <- ...and save to val",
|
||||||
|
"`dest end` <- no matter which branch we took, we always end up here",
|
||||||
|
"",
|
||||||
|
"### Methods",
|
||||||
|
"People who are used to high languages will already know this concept, reusable parts of code with a set of parameters and an optional return value. For this we will use a few variables and a set of jumps in order to be able to use this piece of code from anywhere:",
|
||||||
|
"",
|
||||||
|
"This example implements a basic lerp (linear interpolation) function.",
|
||||||
|
"",
|
||||||
|
"`dest lerp`",
|
||||||
|
"`eval $a$ + ($b$ - $a$) * $i$`",
|
||||||
|
"`save result`",
|
||||||
|
"`jmp $return$`",
|
||||||
|
"",
|
||||||
|
"This function requires the variables \"a\", \"b\" and \"i\" as parameters and saves the result to the variable \"result\". We can now access this function like such:",
|
||||||
|
"",
|
||||||
|
"`buffer 4` <- first we set up our parameters to be used in the function",
|
||||||
|
"`save a`",
|
||||||
|
"`buffer 7`",
|
||||||
|
"`save b`",
|
||||||
|
"`buffer 0.6`",
|
||||||
|
"`save i`",
|
||||||
|
"`buffer returnhere` <- then we define the name of the return point",
|
||||||
|
"`save return`",
|
||||||
|
"`jmp lerp` <- call the function",
|
||||||
|
"`dest returnhere` <- once the function concludes, we are back here",
|
||||||
|
"",
|
||||||
|
"At the end of it all, the variable \"result\" now has the desired value.",
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,7 +20,7 @@ public class AnvilSmithingRecipe {
|
|||||||
this.output = out;
|
this.output = out;
|
||||||
this.left = left;
|
this.left = left;
|
||||||
this.right = right;
|
this.right = right;
|
||||||
if(GeneralConfig.enableLBSMShorterDecay && GeneralConfig.enableLBSMUnlockAnvil) this.tier = 1;
|
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMUnlockAnvil) this.tier = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AnvilSmithingRecipe makeShapeless() {
|
public AnvilSmithingRecipe makeShapeless() {
|
||||||
|
|||||||
@ -26,6 +26,7 @@ public class ItemPool {
|
|||||||
ItemPoolsSatellite.init();
|
ItemPoolsSatellite.init();
|
||||||
ItemPoolsPile.init();
|
ItemPoolsPile.init();
|
||||||
ItemPoolsC130.init();
|
ItemPoolsC130.init();
|
||||||
|
ItemPoolsVendingMachine.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HashMap<String, ItemPool> pools = new HashMap();
|
public static HashMap<String, ItemPool> pools = new HashMap();
|
||||||
|
|||||||
@ -110,7 +110,8 @@ public class ItemPoolsComponent {
|
|||||||
weighted(ModItems.cap_nuka, 0, 1, 16, 2),
|
weighted(ModItems.cap_nuka, 0, 1, 16, 2),
|
||||||
weighted(ModItems.book_guide, 3, 1, 1, 1),
|
weighted(ModItems.book_guide, 3, 1, 1, 1),
|
||||||
weighted(ModBlocks.deco_computer, 0, 1, 1, 1),
|
weighted(ModBlocks.deco_computer, 0, 1, 1, 1),
|
||||||
weighted(ModItems.blueprint_folder, 0, 1, 1, 1)
|
weighted(ModItems.blueprint_folder, 0, 1, 1, 1),
|
||||||
|
weighted(ModItems.coin_token, 0, 1, 1, 2)
|
||||||
};
|
};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
@ -126,7 +127,8 @@ public class ItemPoolsComponent {
|
|||||||
weighted(ModItems.dust_tiny, 0, 1, 3, 75),
|
weighted(ModItems.dust_tiny, 0, 1, 3, 75),
|
||||||
weighted(ModItems.ink, 0, 1, 1, 1),
|
weighted(ModItems.ink, 0, 1, 1, 1),
|
||||||
weighted(ModItems.screwdriver, 0, 1, 1, 10),
|
weighted(ModItems.screwdriver, 0, 1, 1, 10),
|
||||||
weighted(ModItems.blueprint_folder, 0, 1, 1, 5)
|
weighted(ModItems.blueprint_folder, 0, 1, 1, 5),
|
||||||
|
weighted(ModItems.coin_token, 0, 1, 1, 30)
|
||||||
};
|
};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
@ -191,7 +193,8 @@ public class ItemPoolsComponent {
|
|||||||
weighted(Items.experience_bottle, 0, 1, 3, 1),
|
weighted(Items.experience_bottle, 0, 1, 3, 1),
|
||||||
weighted(ModItems.blueprint_folder, 0, 1, 1, 1),
|
weighted(ModItems.blueprint_folder, 0, 1, 1, 1),
|
||||||
weighted(ModItems.blueprint_folder, 1, 1, 1, 1),
|
weighted(ModItems.blueprint_folder, 1, 1, 1, 1),
|
||||||
weighted(ModItems.ammo_container, 0, 1, 1, 1)
|
weighted(ModItems.ammo_container, 0, 1, 1, 1),
|
||||||
|
weighted(ModItems.coin_token, 0, 1, 1, 5)
|
||||||
};
|
};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|||||||
@ -70,7 +70,8 @@ public class ItemPoolsLegacy {
|
|||||||
weighted(ModItems.canister_full, Fluids.BIOFUEL.getID(), 1, 2, 3),
|
weighted(ModItems.canister_full, Fluids.BIOFUEL.getID(), 1, 2, 3),
|
||||||
weighted(ModItems.gas_mask_m65, 60, 1, 1, 2),
|
weighted(ModItems.gas_mask_m65, 60, 1, 1, 2),
|
||||||
weighted(ModItems.gas_mask_filter, 0, 1, 1, 3),
|
weighted(ModItems.gas_mask_filter, 0, 1, 1, 3),
|
||||||
weighted(ModItems.blueprint_folder, 0, 1, 1, 1)
|
weighted(ModItems.blueprint_folder, 0, 1, 1, 1),
|
||||||
|
weighted(ModItems.coin_token, 0, 1, 1, 2)
|
||||||
};
|
};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|||||||
40
src/main/java/com/hbm/itempool/ItemPoolsVendingMachine.java
Normal file
40
src/main/java/com/hbm/itempool/ItemPoolsVendingMachine.java
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package com.hbm.itempool;
|
||||||
|
|
||||||
|
import static com.hbm.lib.HbmChestContents.weighted;
|
||||||
|
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
|
import com.hbm.items.food.ItemConserve.EnumFoodType;
|
||||||
|
|
||||||
|
import net.minecraft.util.WeightedRandomChestContent;
|
||||||
|
|
||||||
|
public class ItemPoolsVendingMachine {
|
||||||
|
|
||||||
|
public static final String POOL_SODA = "POOL_SODA";
|
||||||
|
public static final String POOL_SNACKS = "POOL_SNACKS";
|
||||||
|
|
||||||
|
|
||||||
|
public static void init() {
|
||||||
|
|
||||||
|
new ItemPool(POOL_SODA) {{
|
||||||
|
this.pool = new WeightedRandomChestContent[] {
|
||||||
|
weighted(ModItems.bottle_nuka, 0, 1, 1, 10),
|
||||||
|
weighted(ModItems.bottle_cherry, 0, 1, 1, 5),
|
||||||
|
weighted(ModItems.bottle_quantum, 0, 1, 1, 1),
|
||||||
|
weighted(ModItems.can_bepis, 0, 1, 1, 10),
|
||||||
|
weighted(ModItems.can_luna, 0, 1, 1, 10),
|
||||||
|
weighted(ModItems.can_mug, 0, 1, 1, 10),
|
||||||
|
weighted(ModItems.can_breen, 0, 1, 1, 1),
|
||||||
|
};
|
||||||
|
}};
|
||||||
|
|
||||||
|
new ItemPool(POOL_SNACKS) {{
|
||||||
|
this.pool = new WeightedRandomChestContent[] {
|
||||||
|
weighted(ModItems.definitelyfood, 0, 1, 1, 10),
|
||||||
|
weighted(ModItems.canned_conserve, EnumFoodType.BEEF.ordinal(), 1, 1, 5),
|
||||||
|
weighted(ModItems.canned_conserve, EnumFoodType.TUBE.ordinal(), 1, 1, 5),
|
||||||
|
weighted(ModItems.twinkie, 0, 1, 1, 10),
|
||||||
|
weighted(ModItems.chocolate, 0, 1, 1, 10),
|
||||||
|
};
|
||||||
|
}};
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -936,6 +936,7 @@ public class ModItems {
|
|||||||
public static Item coin_maskman;
|
public static Item coin_maskman;
|
||||||
public static Item coin_worm;
|
public static Item coin_worm;
|
||||||
public static Item coin_ufo;
|
public static Item coin_ufo;
|
||||||
|
public static Item coin_token;
|
||||||
//public static Item coin_siege;
|
//public static Item coin_siege;
|
||||||
//public static Item source;
|
//public static Item source;
|
||||||
|
|
||||||
@ -2972,6 +2973,7 @@ public class ModItems {
|
|||||||
coin_maskman = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("coin_maskman").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":coin_maskman");
|
coin_maskman = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("coin_maskman").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":coin_maskman");
|
||||||
coin_worm = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("coin_worm").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":coin_worm");
|
coin_worm = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("coin_worm").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":coin_worm");
|
||||||
coin_ufo = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("coin_ufo").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":coin_ufo");
|
coin_ufo = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("coin_ufo").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":coin_ufo");
|
||||||
|
coin_token = new Item().setUnlocalizedName("coin_token").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":coin_token");
|
||||||
|
|
||||||
rod_empty = new Item().setUnlocalizedName("rod_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_empty");
|
rod_empty = new Item().setUnlocalizedName("rod_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_empty");
|
||||||
rod = (ItemEnumMulti) new ItemBreedingRod().setUnlocalizedName("rod").setContainerItem(ModItems.rod_empty).setCreativeTab(MainRegistry.controlTab);
|
rod = (ItemEnumMulti) new ItemBreedingRod().setUnlocalizedName("rod").setContainerItem(ModItems.rod_empty).setCreativeTab(MainRegistry.controlTab);
|
||||||
@ -6086,6 +6088,7 @@ public class ModItems {
|
|||||||
GameRegistry.registerItem(coin_maskman, coin_maskman.getUnlocalizedName());
|
GameRegistry.registerItem(coin_maskman, coin_maskman.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(coin_worm, coin_worm.getUnlocalizedName());
|
GameRegistry.registerItem(coin_worm, coin_worm.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(coin_ufo, coin_ufo.getUnlocalizedName());
|
GameRegistry.registerItem(coin_ufo, coin_ufo.getUnlocalizedName());
|
||||||
|
GameRegistry.registerItem(coin_token, coin_token.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(medal_liquidator, medal_liquidator.getUnlocalizedName());
|
GameRegistry.registerItem(medal_liquidator, medal_liquidator.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(bottled_cloud, bottled_cloud.getUnlocalizedName());
|
GameRegistry.registerItem(bottled_cloud, bottled_cloud.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(protection_charm, protection_charm.getUnlocalizedName());
|
GameRegistry.registerItem(protection_charm, protection_charm.getUnlocalizedName());
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.hbm.blocks.generic.BlockPlushie.TileEntityPlushie;
|
|||||||
import com.hbm.blocks.generic.BlockSkeletonHolder.TileEntitySkeletonHolder;
|
import com.hbm.blocks.generic.BlockSkeletonHolder.TileEntitySkeletonHolder;
|
||||||
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
|
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
|
||||||
import com.hbm.blocks.generic.BlockWandStructure.TileEntityWandStructure;
|
import com.hbm.blocks.generic.BlockWandStructure.TileEntityWandStructure;
|
||||||
|
import com.hbm.blocks.machine.BlockVendingMachine.TileEntityVendingMachine;
|
||||||
import com.hbm.blocks.machine.Floodlight.TileEntityFloodlight;
|
import com.hbm.blocks.machine.Floodlight.TileEntityFloodlight;
|
||||||
import com.hbm.blocks.machine.MachineFan.TileEntityFan;
|
import com.hbm.blocks.machine.MachineFan.TileEntityFan;
|
||||||
import com.hbm.blocks.machine.PistonInserter.TileEntityPistonInserter;
|
import com.hbm.blocks.machine.PistonInserter.TileEntityPistonInserter;
|
||||||
@ -212,6 +213,7 @@ public class ClientProxy extends ServerProxy {
|
|||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBobble.class, new RenderBobble());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBobble.class, new RenderBobble());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySnowglobe.class, new RenderSnowglobe());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySnowglobe.class, new RenderSnowglobe());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPlushie.class, new RenderPlushie());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPlushie.class, new RenderPlushie());
|
||||||
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityVendingMachine.class, new RenderVendingMachine());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEmitter.class, new RenderEmitter());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEmitter.class, new RenderEmitter());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLantern.class, new RenderLantern());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLantern.class, new RenderLantern());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLanternBehemoth.class, new RenderLanternBehemoth());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLanternBehemoth.class, new RenderLanternBehemoth());
|
||||||
|
|||||||
@ -807,15 +807,10 @@ public class CraftingManager {
|
|||||||
addRecipeAuto(new ItemStack(ModBlocks.rbmk_blank, 1), new Object[] { "RRR", "R R", "RRR", 'R', ModBlocks.deco_rbmk_smooth });
|
addRecipeAuto(new ItemStack(ModBlocks.rbmk_blank, 1), new Object[] { "RRR", "R R", "RRR", 'R', ModBlocks.deco_rbmk_smooth });
|
||||||
|
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.ladder_sturdy, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', KEY_PLANKS });
|
addRecipeAuto(new ItemStack(ModBlocks.ladder_sturdy, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', KEY_PLANKS });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.ladder_iron, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', IRON.ingot() });
|
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.ladder_gold, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', GOLD.ingot() });
|
addRecipeAuto(new ItemStack(ModBlocks.ladder_gold, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', GOLD.ingot() });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.ladder_aluminium, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', AL.ingot() });
|
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.ladder_copper, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', CU.ingot() });
|
addRecipeAuto(new ItemStack(ModBlocks.ladder_copper, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', CU.ingot() });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.ladder_titanium, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', TI.ingot() });
|
addRecipeAuto(new ItemStack(ModBlocks.ladder_titanium, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', TI.ingot() });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.ladder_lead, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', PB.ingot() });
|
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.ladder_cobalt, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', CO.ingot() });
|
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.ladder_steel, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', STEEL.ingot() });
|
addRecipeAuto(new ItemStack(ModBlocks.ladder_steel, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', STEEL.ingot() });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.ladder_tungsten, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', W.ingot() });
|
|
||||||
|
|
||||||
addShapelessAuto(new ItemStack(ModBlocks.trapdoor_steel, 1), new Object[] { Blocks.trapdoor, STEEL.ingot() });
|
addShapelessAuto(new ItemStack(ModBlocks.trapdoor_steel, 1), new Object[] { Blocks.trapdoor, STEEL.ingot() });
|
||||||
|
|
||||||
|
|||||||
@ -1606,6 +1606,15 @@ public class MainRegistry {
|
|||||||
ignoreMappings.add("hbm:item.weapon_golf_club");
|
ignoreMappings.add("hbm:item.weapon_golf_club");
|
||||||
ignoreMappings.add("hbm:item.weapon_pipe_rusty");
|
ignoreMappings.add("hbm:item.weapon_pipe_rusty");
|
||||||
ignoreMappings.add("hbm:tile.crate_template");
|
ignoreMappings.add("hbm:tile.crate_template");
|
||||||
|
ignoreMappings.add("hbm:tile.barrel_iron");
|
||||||
|
ignoreMappings.add("hbm:tile.factory_titanium_hull");
|
||||||
|
ignoreMappings.add("hbm:tile.factory_advanced_hull");
|
||||||
|
ignoreMappings.add("hbm:tile.vacuum");
|
||||||
|
ignoreMappings.add("hbm:tile.ladder_iron");
|
||||||
|
ignoreMappings.add("hbm:tile.ladder_aluminium");
|
||||||
|
ignoreMappings.add("hbm:tile.ladder_lead");
|
||||||
|
ignoreMappings.add("hbm:tile.ladder_cobalt");
|
||||||
|
ignoreMappings.add("hbm:tile.ladder_tungsten");
|
||||||
|
|
||||||
/// REMAP ///
|
/// REMAP ///
|
||||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||||
|
|||||||
@ -630,23 +630,8 @@ public class ModEventHandlerClient {
|
|||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPlaySound(PlaySoundEvent17 e) {
|
public void onPlaySound(PlaySoundEvent17 e) {
|
||||||
|
|
||||||
EntityPlayer player = MainRegistry.proxy.me();
|
|
||||||
Minecraft mc = Minecraft.getMinecraft();
|
Minecraft mc = Minecraft.getMinecraft();
|
||||||
|
|
||||||
if(player != null && mc.theWorld != null) {
|
|
||||||
int i = MathHelper.floor_double(player.posX);
|
|
||||||
int j = MathHelper.floor_double(player.posY);
|
|
||||||
int k = MathHelper.floor_double(player.posZ);
|
|
||||||
Block block = mc.theWorld.getBlock(i, j, k);
|
|
||||||
|
|
||||||
if(block == ModBlocks.vacuum) {
|
|
||||||
e.result = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ResourceLocation r = e.sound.getPositionedSoundLocation();
|
ResourceLocation r = e.sound.getPositionedSoundLocation();
|
||||||
|
|
||||||
WorldClient wc = mc.theWorld;
|
WorldClient wc = mc.theWorld;
|
||||||
|
|
||||||
//Alright, alright, I give the fuck up, you've wasted my time enough with this bullshit. You win.
|
//Alright, alright, I give the fuck up, you've wasted my time enough with this bullshit. You win.
|
||||||
|
|||||||
@ -63,7 +63,6 @@ public class ResourceManager {
|
|||||||
public static final IModelCustom mine_fat = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mine_fat.obj"));
|
public static final IModelCustom mine_fat = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mine_fat.obj"));
|
||||||
public static final IModelCustom mine_naval = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/naval_mine.obj")).asVBO();
|
public static final IModelCustom mine_naval = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/naval_mine.obj")).asVBO();
|
||||||
|
|
||||||
|
|
||||||
//Oil Pumps
|
//Oil Pumps
|
||||||
public static final IModelCustom derrick = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/derrick.obj")).asVBO();
|
public static final IModelCustom derrick = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/derrick.obj")).asVBO();
|
||||||
public static final IModelCustom pumpjack = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/pumpjack.obj")).asVBO();
|
public static final IModelCustom pumpjack = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/pumpjack.obj")).asVBO();
|
||||||
@ -369,6 +368,9 @@ public class ResourceManager {
|
|||||||
public static final ResourceLocation silo_hatch_large_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/silo_hatch_large.png");
|
public static final ResourceLocation silo_hatch_large_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/silo_hatch_large.png");
|
||||||
public static IModelCustomNamed silo_hatch_large = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/doors/silo_hatch_large.obj")).asVBO();
|
public static IModelCustomNamed silo_hatch_large = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/doors/silo_hatch_large.obj")).asVBO();
|
||||||
|
|
||||||
|
//Vending Machine
|
||||||
|
public static final IModelCustom vending_machine = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/vending_machine.obj")).noSmooth().asVBO();
|
||||||
|
|
||||||
//Skeleton
|
//Skeleton
|
||||||
public static final IModelCustom skeleton_holder = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/blocks/skeleton_holder.obj")).noSmooth().asVBO();
|
public static final IModelCustom skeleton_holder = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/blocks/skeleton_holder.obj")).noSmooth().asVBO();
|
||||||
|
|
||||||
@ -810,6 +812,9 @@ public class ResourceManager {
|
|||||||
//Doors
|
//Doors
|
||||||
public static final ResourceLocation transition_seal_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/transition_seal.png");
|
public static final ResourceLocation transition_seal_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/transition_seal.png");
|
||||||
|
|
||||||
|
//Vending Machine
|
||||||
|
public static final ResourceLocation vending_machine_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/vending_machine.png");
|
||||||
|
|
||||||
//Skeleton
|
//Skeleton
|
||||||
public static final ResourceLocation skeleton_holder_tex = new ResourceLocation(RefStrings.MODID, "textures/particle/skeleton.png");
|
public static final ResourceLocation skeleton_holder_tex = new ResourceLocation(RefStrings.MODID, "textures/particle/skeleton.png");
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,9 @@ package com.hbm.module;
|
|||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import com.hbm.config.ServerConfig;
|
||||||
import com.hbm.tileentity.network.RTTYSystem;
|
import com.hbm.tileentity.network.RTTYSystem;
|
||||||
import com.hbm.tileentity.network.RTTYSystem.RTTYChannel;
|
import com.hbm.tileentity.network.RTTYSystem.RTTYChannel;
|
||||||
import com.hbm.tileentity.network.TileEntityRadioAUTOCAL;
|
|
||||||
import com.hbm.util.Calculator;
|
import com.hbm.util.Calculator;
|
||||||
|
|
||||||
public class ParseMSES1 implements IParse {
|
public class ParseMSES1 implements IParse {
|
||||||
@ -28,7 +28,7 @@ public class ParseMSES1 implements IParse {
|
|||||||
if(line.length() <= 11) return EnumStatementReturn.PARAMETER_ERROR;
|
if(line.length() <= 11) return EnumStatementReturn.PARAMETER_ERROR;
|
||||||
try {
|
try {
|
||||||
int speed = Integer.parseInt(line.substring(11));
|
int speed = Integer.parseInt(line.substring(11));
|
||||||
if(speed < 1 || speed > TileEntityRadioAUTOCAL.MAX_CLOCK_SPEED) return EnumStatementReturn.PARAMETER_ERROR;
|
if(speed < 1 || speed > ServerConfig.AUTOCAL_MAX_CLOCK.get()) return EnumStatementReturn.PARAMETER_ERROR;
|
||||||
ctx.clockSpeed = speed;
|
ctx.clockSpeed = speed;
|
||||||
} catch(Throwable ex) { return EnumStatementReturn.PARAMETER_ERROR; }
|
} catch(Throwable ex) { return EnumStatementReturn.PARAMETER_ERROR; }
|
||||||
return EnumStatementReturn.SKIP;
|
return EnumStatementReturn.SKIP;
|
||||||
@ -37,7 +37,7 @@ public class ParseMSES1 implements IParse {
|
|||||||
// sets the script index to the jump point
|
// sets the script index to the jump point
|
||||||
if(lower.startsWith("jmp ")) {
|
if(lower.startsWith("jmp ")) {
|
||||||
if(line.length() <= 4) return EnumStatementReturn.PARAMETER_ERROR;
|
if(line.length() <= 4) return EnumStatementReturn.PARAMETER_ERROR;
|
||||||
String jmpKey = line.substring(4);
|
String jmpKey = substitute(ctx, line.substring(4));
|
||||||
if(ctx.jmp.containsKey(jmpKey)) {
|
if(ctx.jmp.containsKey(jmpKey)) {
|
||||||
ctx.current = ctx.jmp.get(jmpKey);
|
ctx.current = ctx.jmp.get(jmpKey);
|
||||||
return EnumStatementReturn.OK;
|
return EnumStatementReturn.OK;
|
||||||
@ -49,7 +49,7 @@ public class ParseMSES1 implements IParse {
|
|||||||
if(lower.startsWith("jmpif ")) {
|
if(lower.startsWith("jmpif ")) {
|
||||||
if(line.length() <= 6) return EnumStatementReturn.PARAMETER_ERROR;
|
if(line.length() <= 6) return EnumStatementReturn.PARAMETER_ERROR;
|
||||||
if(!ctx.buffer.equals("true")) return EnumStatementReturn.OK;
|
if(!ctx.buffer.equals("true")) return EnumStatementReturn.OK;
|
||||||
String jmpKey = line.substring(6);
|
String jmpKey = substitute(ctx, line.substring(6));
|
||||||
if(ctx.jmp.containsKey(jmpKey)) {
|
if(ctx.jmp.containsKey(jmpKey)) {
|
||||||
ctx.current = ctx.jmp.get(jmpKey);
|
ctx.current = ctx.jmp.get(jmpKey);
|
||||||
return EnumStatementReturn.OK;
|
return EnumStatementReturn.OK;
|
||||||
@ -61,7 +61,7 @@ public class ParseMSES1 implements IParse {
|
|||||||
if(lower.startsWith("jmpnot ")) {
|
if(lower.startsWith("jmpnot ")) {
|
||||||
if(line.length() <= 7) return EnumStatementReturn.PARAMETER_ERROR;
|
if(line.length() <= 7) return EnumStatementReturn.PARAMETER_ERROR;
|
||||||
if(ctx.buffer.equals("true")) return EnumStatementReturn.OK;
|
if(ctx.buffer.equals("true")) return EnumStatementReturn.OK;
|
||||||
String jmpKey = line.substring(7);
|
String jmpKey = substitute(ctx, line.substring(7));
|
||||||
if(ctx.jmp.containsKey(jmpKey)) {
|
if(ctx.jmp.containsKey(jmpKey)) {
|
||||||
ctx.current = ctx.jmp.get(jmpKey);
|
ctx.current = ctx.jmp.get(jmpKey);
|
||||||
return EnumStatementReturn.OK;
|
return EnumStatementReturn.OK;
|
||||||
@ -225,14 +225,14 @@ public class ParseMSES1 implements IParse {
|
|||||||
// sends an RoR signal using the buffer's contents as the message over the supplied channel
|
// sends an RoR signal using the buffer's contents as the message over the supplied channel
|
||||||
if(lower.startsWith("send ")) {
|
if(lower.startsWith("send ")) {
|
||||||
if(line.length() <= 5 || ctx.buffer.isEmpty()) return EnumStatementReturn.PARAMETER_ERROR;
|
if(line.length() <= 5 || ctx.buffer.isEmpty()) return EnumStatementReturn.PARAMETER_ERROR;
|
||||||
RTTYSystem.broadcast(ctx.world, line.substring(5), ctx.buffer);
|
RTTYSystem.broadcast(ctx.world, substitute(ctx, line.substring(5)), ctx.buffer);
|
||||||
return EnumStatementReturn.OK;
|
return EnumStatementReturn.OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// listnes to an RoR signal using the buffer as the channel, then saves the signal to the buffer
|
// listens to an RoR signal using the supplied channel name and saves it to the buffer
|
||||||
if(lower.equals("listen")) {
|
if(lower.startsWith("listen ")) {
|
||||||
// this picks up expired signals too, so polling has to be implemented by the user
|
if(line.length() <= 7 || ctx.buffer.isEmpty()) return EnumStatementReturn.PARAMETER_ERROR;
|
||||||
RTTYChannel chan = RTTYSystem.listen(ctx.world, ctx.buffer);
|
RTTYChannel chan = RTTYSystem.listen(ctx.world, substitute(ctx, line.substring(7)));
|
||||||
if(chan != null) ctx.buffer = chan.signal + "";
|
if(chan != null) ctx.buffer = chan.signal + "";
|
||||||
return EnumStatementReturn.OK;
|
return EnumStatementReturn.OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,62 @@
|
|||||||
|
package com.hbm.render.tileentity;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.main.ResourceManager;
|
||||||
|
import com.hbm.render.item.ItemRenderBase;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.client.IItemRenderer;
|
||||||
|
|
||||||
|
public class RenderVendingMachine extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||||
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
|
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||||
|
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||||
|
|
||||||
|
switch(tile.getBlockMetadata() - BlockDummyable.offset) {
|
||||||
|
case 2: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||||
|
case 4: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||||
|
case 3: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||||
|
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
World world = tile.getWorldObj();
|
||||||
|
if(world.getBlock(tile.xCoord, tile.yCoord + 1, tile.zCoord) == tile.getBlockType()) {
|
||||||
|
bindTexture(ResourceManager.vending_machine_tex);
|
||||||
|
ResourceManager.vending_machine.renderPart(world.getBlockMetadata(tile.xCoord, tile.yCoord + 1, tile.zCoord) < 6 ? "Soda" : "Obamna");
|
||||||
|
}
|
||||||
|
|
||||||
|
GL11.glShadeModel(GL11.GL_FLAT);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Item getItemForRenderer() {
|
||||||
|
return Item.getItemFromBlock(ModBlocks.vending_machine);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IItemRenderer getRenderer() {
|
||||||
|
return new ItemRenderBase() {
|
||||||
|
public void renderInventory() {
|
||||||
|
GL11.glTranslated(0, -4, 0);
|
||||||
|
GL11.glScaled(6.25, 6.25, 6.25);
|
||||||
|
}
|
||||||
|
public void renderCommonWithStack(ItemStack item) {
|
||||||
|
bindTexture(ResourceManager.vending_machine_tex);
|
||||||
|
ResourceManager.vending_machine.renderPart(item.getItemDamage() % 2 == 0 ? "Soda" : "Obamna");
|
||||||
|
}};
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -28,6 +28,7 @@ import com.hbm.blocks.generic.LogicBlock;
|
|||||||
import com.hbm.blocks.generic.PartEmitter.TileEntityPartEmitter;
|
import com.hbm.blocks.generic.PartEmitter.TileEntityPartEmitter;
|
||||||
import com.hbm.blocks.machine.BlockICF.TileEntityBlockICF;
|
import com.hbm.blocks.machine.BlockICF.TileEntityBlockICF;
|
||||||
import com.hbm.blocks.machine.BlockPWR.TileEntityBlockPWR;
|
import com.hbm.blocks.machine.BlockPWR.TileEntityBlockPWR;
|
||||||
|
import com.hbm.blocks.machine.BlockVendingMachine.TileEntityVendingMachine;
|
||||||
import com.hbm.blocks.machine.Floodlight.TileEntityFloodlight;
|
import com.hbm.blocks.machine.Floodlight.TileEntityFloodlight;
|
||||||
import com.hbm.blocks.machine.FloodlightBeam.TileEntityFloodlightBeam;
|
import com.hbm.blocks.machine.FloodlightBeam.TileEntityFloodlightBeam;
|
||||||
import com.hbm.blocks.machine.MachineCapacitor.TileEntityCapacitor;
|
import com.hbm.blocks.machine.MachineCapacitor.TileEntityCapacitor;
|
||||||
@ -219,6 +220,7 @@ public class TileMappings {
|
|||||||
put(TileEntityBobble.class, "tileentity_ntm_bobblehead");
|
put(TileEntityBobble.class, "tileentity_ntm_bobblehead");
|
||||||
put(TileEntitySnowglobe.class, "tileentity_ntm_snowglobe");
|
put(TileEntitySnowglobe.class, "tileentity_ntm_snowglobe");
|
||||||
put(TileEntityPlushie.class, "tileentity_ntm_plushie");
|
put(TileEntityPlushie.class, "tileentity_ntm_plushie");
|
||||||
|
put(TileEntityVendingMachine.class, "tileentity_vending_machine");
|
||||||
put(TileEntityEmitter.class, "tileentity_ntm_emitter");
|
put(TileEntityEmitter.class, "tileentity_ntm_emitter");
|
||||||
|
|
||||||
put(TileEntityCargoElevator.class, "tileentity_cargo_elevator");
|
put(TileEntityCargoElevator.class, "tileentity_cargo_elevator");
|
||||||
|
|||||||
@ -90,7 +90,7 @@ public class TileEntityMachineIndustrialTurbine extends TileEntityTurbineBase im
|
|||||||
@Override
|
@Override
|
||||||
public void onServerTick() {
|
public void onServerTick() {
|
||||||
this.spin = (double) flywheel_energy / FLYWHEEL_MAX_ENERGY; //because dense steams have way lower energy output, turbines running them take a lot longer to spool up
|
this.spin = (double) flywheel_energy / FLYWHEEL_MAX_ENERGY; //because dense steams have way lower energy output, turbines running them take a lot longer to spool up
|
||||||
this.lastPowerTarget = (long) (this.spin * maxPower);
|
this.lastPowerTarget = Math.min((long) (Math.max(this.spin, 0.1) * maxPower), this.flywheel_energy);
|
||||||
this.flywheel_energy -= this.lastPowerTarget;
|
this.flywheel_energy -= this.lastPowerTarget;
|
||||||
this.powerBuffer = (long) (this.lastPowerTarget);
|
this.powerBuffer = (long) (this.lastPowerTarget);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,6 @@ import com.hbm.inventory.container.ContainerBarrel;
|
|||||||
import com.hbm.inventory.fluid.FluidType;
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.fluid.Fluids;
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||||
import com.hbm.inventory.fluid.trait.FT_Corrosive;
|
|
||||||
import com.hbm.inventory.fluid.trait.FT_Polluting;
|
import com.hbm.inventory.fluid.trait.FT_Polluting;
|
||||||
import com.hbm.inventory.fluid.trait.FluidTrait.FluidReleaseType;
|
import com.hbm.inventory.fluid.trait.FluidTrait.FluidReleaseType;
|
||||||
import com.hbm.inventory.gui.GUIBarrel;
|
import com.hbm.inventory.gui.GUIBarrel;
|
||||||
@ -241,23 +240,6 @@ public class TileEntityBarrel extends TileEntityMachineBase implements SimpleCom
|
|||||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, "random.fizz", 1.0F, 1.0F);
|
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, "random.fizz", 1.0F, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
//for when you fill corrosive liquid into an iron tank
|
|
||||||
if((b == ModBlocks.barrel_iron && tank.getTankType().isCorrosive()) ||
|
|
||||||
(b == ModBlocks.barrel_steel && tank.getTankType().hasTrait(FT_Corrosive.class) && tank.getTankType().getTrait(FT_Corrosive.class).getRating() > 50)) {
|
|
||||||
ItemStack[] copy = this.slots.clone();
|
|
||||||
this.slots = new ItemStack[6];
|
|
||||||
worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.barrel_corroded);
|
|
||||||
TileEntityBarrel barrel = (TileEntityBarrel)worldObj.getTileEntity(xCoord, yCoord, zCoord);
|
|
||||||
|
|
||||||
if(barrel != null) {
|
|
||||||
barrel.tank.setTankType(tank.getTankType());
|
|
||||||
barrel.tank.setFill(Math.min(barrel.tank.getMaxFill(), tank.getFill()));
|
|
||||||
barrel.slots = copy;
|
|
||||||
}
|
|
||||||
|
|
||||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, "random.fizz", 1.0F, 1.0F);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(b == ModBlocks.barrel_corroded ) {
|
if(b == ModBlocks.barrel_corroded ) {
|
||||||
if(worldObj.rand.nextInt(3) == 0) {
|
if(worldObj.rand.nextInt(3) == 0) {
|
||||||
tank.setFill(tank.getFill() - 1);
|
tank.setFill(tank.getFill() - 1);
|
||||||
|
|||||||
@ -9,12 +9,15 @@ import com.hbm.module.ParseMSES1;
|
|||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
import com.hbm.tileentity.TileEntityTickingBase;
|
import com.hbm.tileentity.TileEntityTickingBase;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.nbt.NBTTagList;
|
import net.minecraft.nbt.NBTTagList;
|
||||||
import net.minecraft.nbt.NBTTagString;
|
import net.minecraft.nbt.NBTTagString;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class TileEntityRadioAUTOCAL extends TileEntityTickingBase implements IControlReceiver, IGUIProvider {
|
public class TileEntityRadioAUTOCAL extends TileEntityTickingBase implements IControlReceiver, IGUIProvider {
|
||||||
@ -23,8 +26,6 @@ public class TileEntityRadioAUTOCAL extends TileEntityTickingBase implements ICo
|
|||||||
public boolean ignoreError = false;
|
public boolean ignoreError = false;
|
||||||
public boolean autoReboot = false;
|
public boolean autoReboot = false;
|
||||||
|
|
||||||
public static final int MAX_CLOCK_SPEED = 5;
|
|
||||||
|
|
||||||
public String[] script = new String[0];
|
public String[] script = new String[0];
|
||||||
public IParse msesv1 = new ParseMSES1();
|
public IParse msesv1 = new ParseMSES1();
|
||||||
public ParseContext ctx;
|
public ParseContext ctx;
|
||||||
@ -174,4 +175,18 @@ public class TileEntityRadioAUTOCAL extends TileEntityTickingBase implements ICo
|
|||||||
|
|
||||||
this.markChanged();
|
this.markChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AxisAlignedBB bb = null;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AxisAlignedBB getRenderBoundingBox() {
|
||||||
|
if(bb == null) bb = AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 2, zCoord + 1);
|
||||||
|
return bb;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public double getMaxRenderDistanceSquared() {
|
||||||
|
return 65536.0D;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -843,10 +843,10 @@ public class BunkerComponents {
|
|||||||
placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, getDecoModelMeta(2), 10, 3, 2, box);
|
placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, getDecoModelMeta(2), 10, 3, 2, box);
|
||||||
fillWithMetadataBlocks(world, box, 10, 2, 3, 10, 3, 3, ModBlocks.tape_recorder, decoMetaW);
|
fillWithMetadataBlocks(world, box, 10, 2, 3, 10, 3, 3, ModBlocks.tape_recorder, decoMetaW);
|
||||||
fillWithMetadataBlocks(world, box, 9, 1, 2, 9, 1, 3, ModBlocks.steel_grate, 7);
|
fillWithMetadataBlocks(world, box, 9, 1, 2, 9, 1, 3, ModBlocks.steel_grate, 7);
|
||||||
fillWithBlocks(world, box, 9, 1, 5, 10, 1, 5, ModBlocks.barrel_iron);
|
fillWithBlocks(world, box, 9, 1, 5, 10, 1, 5, ModBlocks.barrel_corroded);
|
||||||
placeBlockAtCurrentPosition(world, ModBlocks.barrel_iron, 0, 10, 2, 5, box);
|
placeBlockAtCurrentPosition(world, ModBlocks.barrel_corroded, 0, 10, 2, 5, box);
|
||||||
fillWithBlocks(world, box, 6, 1, 5, 6, 2, 5, ModBlocks.barrel_iron);
|
fillWithBlocks(world, box, 6, 1, 5, 6, 2, 5, ModBlocks.barrel_corroded);
|
||||||
placeBlockAtCurrentPosition(world, ModBlocks.barrel_iron, 0, 6, 1, 2, box);
|
placeBlockAtCurrentPosition(world, ModBlocks.barrel_corroded, 0, 6, 1, 2, box);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
for(int i = 7; i <= 9; i += 2) {
|
for(int i = 7; i <= 9; i += 2) {
|
||||||
|
|||||||
@ -1750,6 +1750,7 @@ item.coin_creeper.name=Nukleare Creeper-Münze
|
|||||||
item.coin_maskman.name=Maskenmann-Münze
|
item.coin_maskman.name=Maskenmann-Münze
|
||||||
item.coin_radiation.name=Strahlungs-Münze
|
item.coin_radiation.name=Strahlungs-Münze
|
||||||
item.coin_siege.name=Belagerungsmünze
|
item.coin_siege.name=Belagerungsmünze
|
||||||
|
item.coin_token.name=Automatenmünze
|
||||||
item.coin_ufo.name=UFO-Münze
|
item.coin_ufo.name=UFO-Münze
|
||||||
item.coin_worm.name=Balls-O-Tron-Münze
|
item.coin_worm.name=Balls-O-Tron-Münze
|
||||||
item.coke.coal.name=Kohlekoks
|
item.coke.coal.name=Kohlekoks
|
||||||
@ -4980,6 +4981,7 @@ tile.turret_tau.name=Tauonengeschütz
|
|||||||
tile.turret_tauon.name=XVL1456-Prototypengeschütz "Tauon"
|
tile.turret_tauon.name=XVL1456-Prototypengeschütz "Tauon"
|
||||||
tile.vacuum.name=Vakuum
|
tile.vacuum.name=Vakuum
|
||||||
tile.vault_door.name=Vault-Tec Sprengtür
|
tile.vault_door.name=Vault-Tec Sprengtür
|
||||||
|
tile.vending_machine.name=Automat
|
||||||
tile.vent_chlorine.name=Chlorgas-Auslass
|
tile.vent_chlorine.name=Chlorgas-Auslass
|
||||||
tile.vent_chlorine_seal.name=Chlorgassiegel
|
tile.vent_chlorine_seal.name=Chlorgassiegel
|
||||||
tile.vent_cloud.name=Wolken-Auslass
|
tile.vent_cloud.name=Wolken-Auslass
|
||||||
|
|||||||
@ -2541,6 +2541,7 @@ item.coin_creeper.name=Nuclear Creeper Coin
|
|||||||
item.coin_maskman.name=Maskman Coin
|
item.coin_maskman.name=Maskman Coin
|
||||||
item.coin_radiation.name=Radiation Coin
|
item.coin_radiation.name=Radiation Coin
|
||||||
item.coin_siege.name=Siege Coin
|
item.coin_siege.name=Siege Coin
|
||||||
|
item.coin_token.name=Vending Machine Token
|
||||||
item.coin_ufo.name=UFO Coin
|
item.coin_ufo.name=UFO Coin
|
||||||
item.coin_worm.name=Balls-O-Tron Coin
|
item.coin_worm.name=Balls-O-Tron Coin
|
||||||
item.coke.coal.name=Coal Coke
|
item.coke.coal.name=Coal Coke
|
||||||
@ -6321,6 +6322,7 @@ tile.turret_tau.name=Tauon Turret
|
|||||||
tile.turret_tauon.name=XVL1456 Prototype Turret "Tauon"
|
tile.turret_tauon.name=XVL1456 Prototype Turret "Tauon"
|
||||||
tile.vacuum.name=Vacuum
|
tile.vacuum.name=Vacuum
|
||||||
tile.vault_door.name=Vault-Tec Blast Door
|
tile.vault_door.name=Vault-Tec Blast Door
|
||||||
|
tile.vending_machine.name=Vending Machine
|
||||||
tile.vent_chlorine.name=Chlorine Vent
|
tile.vent_chlorine.name=Chlorine Vent
|
||||||
tile.vent_chlorine_seal.name=Chlorine Seal
|
tile.vent_chlorine_seal.name=Chlorine Seal
|
||||||
tile.vent_cloud.name=Cloud Vent
|
tile.vent_cloud.name=Cloud Vent
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
src/main/resources/assets/hbm/textures/items/coin_token.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/coin_token.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 322 B |
Loading…
x
Reference in New Issue
Block a user