mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
i fell on a vietcong punji stick and now i am paraplegic
This commit is contained in:
parent
26b5c98ac4
commit
94a1c19640
22
changelog
22
changelog
@ -4,7 +4,29 @@
|
||||
* Creates 16 when crafted, however it is not returned when the muffled machine is broken
|
||||
* Should work with pretty much all machines that use looped sounds, as well as a few other noisy ones (compressors, diesel generators, presses)
|
||||
* Simply right-click to install, doesn't need to be inserted into an upgrade slot, in fact it works on a few machines that have no GUI at all
|
||||
* Lemegeton
|
||||
* A book that can do material upgrading, like turning steel into HSS, HSS into Tc-steel, lead into gold, gold into bismuth, bismuth into osmiridium, etc.
|
||||
* Basically allows a material to be upgraded to the next gating material in progression
|
||||
* Obviously unobtainable in survival mode
|
||||
* I don't know how this would ever be useful but I was stuck in a phonecall at work for two consecutive hours and didn't have anything else to do
|
||||
* They should invent handsets that don't hurt when you hold them onto your head for too long
|
||||
* Has no NEI handler because the call ended before I got to that
|
||||
|
||||
## Changed
|
||||
* Large turbines, levis and geothermal heat exchangers now have their own sounds when operating
|
||||
* Anvils will now list ingredients in red if those aren't present in the player's inventory
|
||||
* Derricks now only need one set of steel pipes instead of 3. They can also be recycled by shredding, returning 32 steel
|
||||
* Pumpjacks now need a single desh motor instead of two regular ones
|
||||
* Rare earth ore, instead of detonating into a million fragments that are annoying to process, clog inventories and just cause everyone to not mine that ore in earlygame, will now drop a chunk of rare earth ore
|
||||
* Rare earth chunks can be shredded directly into one unit of desh blend
|
||||
* For efficiencymaxxers, silk-touching rare earth still works as expected, yielding two units when shredded
|
||||
* The luck enchantment should work as expected, dropping multiple chunks. Yay!
|
||||
* To get things that can be useful in small amounts in earlygame like boron and cobalt (boron for Atlas and cobalt for tools), the rare earth chunk can be hammered down into fragments on a steel anvil
|
||||
* Cerium and lanthanium, due to being useless, only have a 10% chance of producing a framgent
|
||||
* Boron and cobalt each produce a guaranteed fragment, as well as an additional one with a 50% chance
|
||||
* Neodymium and niobium both yield a shard 50% of the time
|
||||
|
||||
## Fixed
|
||||
* Fixed basalt ores dropping their items with invalid metadata
|
||||
* Fixed creative infinite fluid tanks not being able to fill fluid gauges at >0PU
|
||||
* Fixed an issue where repeatedly opening and closing certain doors would cause their sound loop to get stuck running forever
|
||||
|
||||
@ -16,4 +16,5 @@ credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion al
|
||||
\ (OpenComputers integration), martemen (project settings), Pvndols (thorium fuel recipe, gas turbine),\
|
||||
\ JamesH2 (blood mechanics, nitric acid, particle emitter), sdddddf80 (recipe configs, chinese localization,\
|
||||
\ custom machine holograms, I18n improvements), SuperCraftAlex (tooltips) LePeep (coilgun model, BDCL QC),\
|
||||
\ 70k (textures, glyphid AI, strand caster), Maksymisio (polish localization) Ice-Arrow (research reactor tweaks)
|
||||
\ 70k (textures, glyphid AI, strand caster), Maksymisio (polish localization) Ice-Arrow (research reactor tweaks),\
|
||||
\ 245tt (anvil GUI improvements), MellowArpeggiation (turbine sounds, sound fixes)
|
||||
|
||||
@ -143,7 +143,6 @@ public class ModBlocks {
|
||||
public static Block stalagmite;
|
||||
public static Block stalactite;
|
||||
public static Block stone_biome;
|
||||
public static Block stone_deep_cobble;
|
||||
|
||||
public static Block depth_brick;
|
||||
public static Block depth_tiles;
|
||||
@ -1376,7 +1375,6 @@ public class ModBlocks {
|
||||
stalagmite = new BlockStalagmite().setBlockName("stalagmite").setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.0F);
|
||||
stalactite = new BlockStalagmite().setBlockName("stalactite").setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.0F);
|
||||
stone_biome = new BlockBiomeStone().setBlockName("stone_biome").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F);
|
||||
stone_deep_cobble = new BlockDeepCobble().setBlockName("stone_deep_cobble").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(30.0F);
|
||||
|
||||
basalt = new BlockGeneric(Material.rock).setBlockName("basalt").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt");
|
||||
ore_basalt = new BlockOreBasalt().setBlockName("ore_basalt").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_basalt");
|
||||
|
||||
@ -1,43 +0,0 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.BlockEnumMulti;
|
||||
|
||||
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.world.World;
|
||||
|
||||
public class BlockDeepCobble extends BlockEnumMulti {
|
||||
|
||||
public static enum EnumDeepCobbleTypes {
|
||||
NORMAL,
|
||||
BURNING,
|
||||
STEAMING
|
||||
}
|
||||
|
||||
public BlockDeepCobble() {
|
||||
super(Material.rock, EnumDeepCobbleTypes.class, true, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
|
||||
super.randomDisplayTick(world, x, y, z, rand);
|
||||
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
Block b = world.getBlock(x, y + 1, z);
|
||||
|
||||
if(!b.isNormalCube()) {
|
||||
if(meta == EnumDeepCobbleTypes.BURNING.ordinal()) {
|
||||
world.spawnParticle("flame", x + rand.nextDouble(), y + 1.0625, z + rand.nextDouble(), 0.0, 0.0, 0.0);
|
||||
}
|
||||
|
||||
if(meta == EnumDeepCobbleTypes.STEAMING.ordinal()) {
|
||||
world.spawnParticle("cloud", x + 0.25 + rand.nextDouble() * 0.5, y + 1.0625, z + 0.25 + rand.nextDouble() * 0.5, 0.0, 0.05, 0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5,6 +5,7 @@ import java.util.Random;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.items.ItemEnums.EnumChunkType;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -151,20 +152,7 @@ public class BlockOre extends Block {
|
||||
}
|
||||
}
|
||||
if(this == ModBlocks.ore_rare || this == ModBlocks.ore_gneiss_rare) {
|
||||
switch(rand.nextInt(6)) {
|
||||
case 0:
|
||||
return ModItems.fragment_boron;
|
||||
case 1:
|
||||
return ModItems.fragment_cerium;
|
||||
case 2:
|
||||
return ModItems.fragment_cobalt;
|
||||
case 3:
|
||||
return ModItems.fragment_lanthanium;
|
||||
case 4:
|
||||
return ModItems.fragment_neodymium;
|
||||
case 5:
|
||||
return ModItems.fragment_niobium;
|
||||
}
|
||||
return ModItems.chunk_ore;
|
||||
}
|
||||
if(this == ModBlocks.deco_aluminium) {
|
||||
return ModItems.ingot_aluminium;
|
||||
@ -266,7 +254,8 @@ public class BlockOre extends Block {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int p_149692_1_) {
|
||||
public int damageDropped(int meta) {
|
||||
if(this == ModBlocks.ore_rare || this == ModBlocks.ore_gneiss_rare) return EnumChunkType.RARE.ordinal();
|
||||
return this == ModBlocks.waste_planks ? 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
@ -14,109 +14,93 @@ import net.minecraft.inventory.SlotCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerBook extends Container {
|
||||
|
||||
public InventoryCrafting craftMatrix = new InventoryCrafting(this, 2, 2);
|
||||
public IInventory craftResult = new InventoryCraftResult();
|
||||
|
||||
public ContainerBook(InventoryPlayer inventory) {
|
||||
|
||||
this.addSlotToContainer(new SlotCrafting(inventory.player, this.craftMatrix, this.craftResult, 0, 124, 35));
|
||||
public InventoryCrafting craftMatrix = new InventoryCrafting(this, 2, 2);
|
||||
public IInventory craftResult = new InventoryCraftResult();
|
||||
|
||||
for (int l = 0; l < 2; ++l) {
|
||||
for (int i1 = 0; i1 < 2; ++i1) {
|
||||
this.addSlotToContainer(new Slot(this.craftMatrix, i1 + l * 2, 30 + i1 * 36, 17 + l * 36));
|
||||
}
|
||||
}
|
||||
public ContainerBook(InventoryPlayer inventory) {
|
||||
|
||||
for(int l = 0; l < 3; ++l) {
|
||||
for (int i1 = 0; i1 < 9; ++i1) {
|
||||
this.addSlotToContainer(new Slot(inventory, i1 + l * 9 + 9, 8 + i1 * 18, 84 + l * 18));
|
||||
}
|
||||
}
|
||||
this.addSlotToContainer(new SlotCrafting(inventory.player, this.craftMatrix, this.craftResult, 0, 124, 35));
|
||||
|
||||
for(int l = 0; l < 9; ++l) {
|
||||
this.addSlotToContainer(new Slot(inventory, l, 8 + l * 18, 142));
|
||||
}
|
||||
for(int l = 0; l < 2; ++l) {
|
||||
for(int i1 = 0; i1 < 2; ++i1) {
|
||||
this.addSlotToContainer(new Slot(this.craftMatrix, i1 + l * 2, 30 + i1 * 36, 17 + l * 36));
|
||||
}
|
||||
}
|
||||
|
||||
this.onCraftMatrixChanged(this.craftMatrix);
|
||||
}
|
||||
|
||||
public void onCraftMatrixChanged(IInventory inventory) {
|
||||
this.craftResult.setInventorySlotContents(0, MagicRecipes.getRecipe(this.craftMatrix));
|
||||
}
|
||||
|
||||
public void onContainerClosed(EntityPlayer player) {
|
||||
super.onContainerClosed(player);
|
||||
for(int l = 0; l < 3; ++l) {
|
||||
for(int i1 = 0; i1 < 9; ++i1) {
|
||||
this.addSlotToContainer(new Slot(inventory, i1 + l * 9 + 9, 8 + i1 * 18, 84 + l * 18));
|
||||
}
|
||||
}
|
||||
|
||||
if (!player.worldObj.isRemote) {
|
||||
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
ItemStack itemstack = this.craftMatrix.getStackInSlotOnClosing(i);
|
||||
for(int l = 0; l < 9; ++l) {
|
||||
this.addSlotToContainer(new Slot(inventory, l, 8 + l * 18, 142));
|
||||
}
|
||||
|
||||
this.onCraftMatrixChanged(this.craftMatrix);
|
||||
}
|
||||
|
||||
public void onCraftMatrixChanged(IInventory inventory) {
|
||||
this.craftResult.setInventorySlotContents(0, MagicRecipes.getRecipe(this.craftMatrix));
|
||||
}
|
||||
|
||||
public void onContainerClosed(EntityPlayer player) {
|
||||
super.onContainerClosed(player);
|
||||
|
||||
if(!player.worldObj.isRemote) {
|
||||
|
||||
for(int i = 0; i < 4; ++i) {
|
||||
ItemStack itemstack = this.craftMatrix.getStackInSlotOnClosing(i);
|
||||
|
||||
if(itemstack != null)
|
||||
player.dropPlayerItemWithRandomChoice(itemstack, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (itemstack != null)
|
||||
player.dropPlayerItemWithRandomChoice(itemstack, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
{
|
||||
ItemStack itemstack = null;
|
||||
Slot slot = (Slot)this.inventorySlots.get(p_82846_2_);
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) {
|
||||
ItemStack itemstack = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(p_82846_2_);
|
||||
|
||||
if (slot != null && slot.getHasStack())
|
||||
{
|
||||
ItemStack itemstack1 = slot.getStack();
|
||||
itemstack = itemstack1.copy();
|
||||
if(slot != null && slot.getHasStack()) {
|
||||
ItemStack itemstack1 = slot.getStack();
|
||||
itemstack = itemstack1.copy();
|
||||
|
||||
if (p_82846_2_ == 0)
|
||||
{
|
||||
if (!this.mergeItemStack(itemstack1, 10 - 5, 46 - 5, true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if(p_82846_2_ == 0) {
|
||||
if(!this.mergeItemStack(itemstack1, 10 - 5, 46 - 5, true)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
slot.onSlotChange(itemstack1, itemstack);
|
||||
}
|
||||
else if (p_82846_2_ >= 10 - 5 && p_82846_2_ < 37 - 5)
|
||||
{
|
||||
if (!this.mergeItemStack(itemstack1, 37 - 5, 46 - 5, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (p_82846_2_ >= 37 - 5 && p_82846_2_ < 46 - 5)
|
||||
{
|
||||
if (!this.mergeItemStack(itemstack1, 10 - 5, 37 - 5, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(itemstack1, 10 - 5, 46 - 5, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
slot.onSlotChange(itemstack1, itemstack);
|
||||
} else if(p_82846_2_ >= 10 - 5 && p_82846_2_ < 37 - 5) {
|
||||
if(!this.mergeItemStack(itemstack1, 37 - 5, 46 - 5, false)) {
|
||||
return null;
|
||||
}
|
||||
} else if(p_82846_2_ >= 37 - 5 && p_82846_2_ < 46 - 5) {
|
||||
if(!this.mergeItemStack(itemstack1, 10 - 5, 37 - 5, false)) {
|
||||
return null;
|
||||
}
|
||||
} else if(!this.mergeItemStack(itemstack1, 10 - 5, 46 - 5, false)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (itemstack1.stackSize == 0)
|
||||
{
|
||||
slot.putStack((ItemStack)null);
|
||||
}
|
||||
else
|
||||
{
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
if(itemstack1.stackSize == 0) {
|
||||
slot.putStack((ItemStack) null);
|
||||
} else {
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (itemstack1.stackSize == itemstack.stackSize)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if(itemstack1.stackSize == itemstack.stackSize) {
|
||||
return null;
|
||||
}
|
||||
|
||||
slot.onPickupFromSlot(p_82846_1_, itemstack1);
|
||||
}
|
||||
slot.onPickupFromSlot(p_82846_1_, itemstack1);
|
||||
}
|
||||
|
||||
return itemstack;
|
||||
}
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
@ -124,8 +108,7 @@ public class ContainerBook extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_94530_a(ItemStack stack, Slot slot) {
|
||||
return slot.inventory != this.craftResult && super.func_94530_a(stack, slot);
|
||||
}
|
||||
|
||||
public boolean func_94530_a(ItemStack stack, Slot slot) {
|
||||
return slot.inventory != this.craftResult && super.func_94530_a(stack, slot);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,96 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.recipes.LemegetonRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.InventoryCraftResult;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.inventory.SlotCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerLemegeton extends Container {
|
||||
|
||||
public InventoryCrafting craftMatrix = new InventoryCrafting(this, 1, 1);
|
||||
public IInventory craftResult = new InventoryCraftResult();
|
||||
|
||||
public ContainerLemegeton(InventoryPlayer inventory) {
|
||||
|
||||
this.addSlotToContainer(new SlotCrafting(inventory.player, this.craftMatrix, this.craftResult, 0, 107, 35));
|
||||
this.addSlotToContainer(new Slot(this.craftMatrix, 0, 49, 35));
|
||||
|
||||
for(int l = 0; l < 3; ++l) {
|
||||
for(int i1 = 0; i1 < 9; ++i1) {
|
||||
this.addSlotToContainer(new Slot(inventory, i1 + l * 9 + 9, 8 + i1 * 18, 84 + l * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int l = 0; l < 9; ++l) {
|
||||
this.addSlotToContainer(new Slot(inventory, l, 8 + l * 18, 142));
|
||||
}
|
||||
|
||||
this.onCraftMatrixChanged(this.craftMatrix);
|
||||
}
|
||||
|
||||
public void onCraftMatrixChanged(IInventory inventory) {
|
||||
this.craftResult.setInventorySlotContents(0, LemegetonRecipes.getRecipe(this.craftMatrix.getStackInSlot(0)));
|
||||
}
|
||||
|
||||
public void onContainerClosed(EntityPlayer player) {
|
||||
super.onContainerClosed(player);
|
||||
|
||||
if(!player.worldObj.isRemote) {
|
||||
ItemStack itemstack = this.craftMatrix.getStackInSlotOnClosing(0);
|
||||
if(itemstack != null) player.dropPlayerItemWithRandomChoice(itemstack, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int slotNo) {
|
||||
ItemStack itemstack = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(slotNo);
|
||||
|
||||
if(slot != null && slot.getHasStack()) {
|
||||
ItemStack itemstack1 = slot.getStack();
|
||||
itemstack = itemstack1.copy();
|
||||
|
||||
if(slotNo <= 1) {
|
||||
if(!this.mergeItemStack(itemstack1, 2, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
slot.onSlotChange(itemstack1, itemstack);
|
||||
} else if(!this.mergeItemStack(itemstack1, 1, 2, false)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if(itemstack1.stackSize == 0) {
|
||||
slot.putStack((ItemStack) null);
|
||||
} else {
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
|
||||
if(itemstack1.stackSize == itemstack.stackSize) {
|
||||
return null;
|
||||
}
|
||||
|
||||
slot.onPickupFromSlot(p_82846_1_, itemstack1);
|
||||
}
|
||||
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return player.inventory.hasItem(ModItems.book_of_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_94530_a(ItemStack stack, Slot slot) {
|
||||
return slot.inventory != this.craftResult && super.func_94530_a(stack, slot);
|
||||
}
|
||||
}
|
||||
@ -245,7 +245,7 @@ public class GUIAnvil extends GuiContainer {
|
||||
if(this.selection >= 0) {
|
||||
|
||||
AnvilConstructionRecipe recipe = recipes.get(this.selection);
|
||||
List<String> list = recipeToList(recipe,playerInventory);
|
||||
List<String> list = recipeToList(recipe, playerInventory);
|
||||
int longest = 0;
|
||||
|
||||
for(String s : list) {
|
||||
@ -276,53 +276,51 @@ public class GUIAnvil extends GuiContainer {
|
||||
* @param recipe
|
||||
* @return
|
||||
*/
|
||||
public List<String> recipeToList(AnvilConstructionRecipe recipe,InventoryPlayer inventory) {
|
||||
public List<String> recipeToList(AnvilConstructionRecipe recipe, InventoryPlayer inventory) {
|
||||
|
||||
List<String> list = new ArrayList();
|
||||
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + "Inputs:");
|
||||
|
||||
|
||||
for(AStack stack : recipe.input) {
|
||||
if(stack instanceof ComparableStack) {
|
||||
if(stack instanceof ComparableStack) {
|
||||
ItemStack input = ((ComparableStack) stack).toStack();
|
||||
boolean hasItem = false;
|
||||
int amount =0;
|
||||
for (int i = 0; i < inventory.mainInventory.length; i++) {
|
||||
int amount = 0;
|
||||
for(int i = 0; i < inventory.mainInventory.length; i++) {
|
||||
ItemStack stackItem = inventory.mainInventory[i];
|
||||
if(stackItem == null)
|
||||
{
|
||||
if(stackItem == null) {
|
||||
continue;
|
||||
}
|
||||
if (stackItem.getItem() == input.getItem() && input.getItemDamage() == stackItem.getItemDamage()) {
|
||||
if(stackItem.getItem() == input.getItem() && input.getItemDamage() == stackItem.getItemDamage()) {
|
||||
hasItem = true;
|
||||
amount +=stackItem.stackSize;
|
||||
amount += stackItem.stackSize;
|
||||
}
|
||||
}
|
||||
if(hasItem && amount >= stack.stacksize) {
|
||||
list.add(">" + input.stackSize + "x " + input.getDisplayName());
|
||||
}else {
|
||||
} else {
|
||||
list.add(EnumChatFormatting.RED + ">" + input.stackSize + "x " + input.getDisplayName());
|
||||
}
|
||||
} else if(stack instanceof OreDictStack) {
|
||||
OreDictStack input = (OreDictStack) stack;
|
||||
ArrayList<ItemStack> ores = OreDictionary.getOres(input.name);
|
||||
|
||||
|
||||
if(ores.size() > 0) {
|
||||
ItemStack inStack = ores.get((int) (Math.abs(System.currentTimeMillis() / 1000) % ores.size()));
|
||||
boolean hasItem = false;
|
||||
int amount =0;
|
||||
for (int i = 0; i < inventory.mainInventory.length; i++) {
|
||||
int amount = 0;
|
||||
for(int i = 0; i < inventory.mainInventory.length; i++) {
|
||||
ItemStack stackItem = inventory.mainInventory[i];
|
||||
if(stackItem == null)
|
||||
{
|
||||
if(stackItem == null) {
|
||||
continue;
|
||||
}
|
||||
if (stackItem.getItem() == inStack.getItem() && inStack.getItemDamage() == stackItem.getItemDamage()) {
|
||||
if(input.matchesRecipe(stackItem, true)) {
|
||||
hasItem = true;
|
||||
amount += stackItem.stackSize;
|
||||
}
|
||||
}
|
||||
if (hasItem && amount >= stack.stacksize) {
|
||||
ItemStack inStack = ores.get((int) (Math.abs(System.currentTimeMillis() / 1000) % ores.size()));
|
||||
if(hasItem && amount >= stack.stacksize) {
|
||||
list.add(">" + input.stacksize + "x " + inStack.getDisplayName());
|
||||
} else {
|
||||
list.add(EnumChatFormatting.RED + ">" + input.stacksize + "x " + inStack.getDisplayName());
|
||||
@ -335,11 +333,11 @@ public class GUIAnvil extends GuiContainer {
|
||||
|
||||
list.add("");
|
||||
list.add(EnumChatFormatting.YELLOW + "Outputs:");
|
||||
|
||||
|
||||
for(AnvilOutput stack : recipe.output) {
|
||||
list.add(">" + stack.stack.stackSize + "x " + stack.stack.getDisplayName() + (stack.chance != 1F ? (" (" + (stack.chance * 100) + "%)" ) : ""));
|
||||
list.add(">" + stack.stack.stackSize + "x " + stack.stack.getDisplayName() + (stack.chance != 1F ? (" (" + (stack.chance * 100) + "%)") : ""));
|
||||
}
|
||||
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@ -16,6 +16,8 @@ public class GUIBook extends GuiContainer {
|
||||
|
||||
public GUIBook(InventoryPlayer player) {
|
||||
super(new ContainerBook(player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int mX, int mY) {
|
||||
@ -25,7 +27,6 @@ public class GUIBook extends GuiContainer {
|
||||
}
|
||||
|
||||
protected void drawGuiContainerBackgroundLayer(float inter, int mX, int mY) {
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int left = (this.width - this.xSize) / 2;
|
||||
|
||||
40
src/main/java/com/hbm/inventory/gui/GUILemegeton.java
Normal file
40
src/main/java/com/hbm/inventory/gui/GUILemegeton.java
Normal file
@ -0,0 +1,40 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerLemegeton;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUILemegeton extends GuiContainer {
|
||||
|
||||
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_lemegeton.png");
|
||||
|
||||
public GUILemegeton(InventoryPlayer player) {
|
||||
super(new ContainerLemegeton(player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int mX, int mY) {
|
||||
|
||||
Minecraft.getMinecraft().standardGalacticFontRenderer.drawString("Material Upgrade Conversion", 28, 6, 4210752);
|
||||
Minecraft.getMinecraft().standardGalacticFontRenderer.drawString("Standard Inventory", 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerBackgroundLayer(float inter, int mX, int mY) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int left = (this.width - this.xSize) / 2;
|
||||
int top = (this.height - this.ySize) / 2;
|
||||
|
||||
this.drawTexturedModalRect(left, top, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
if(this.inventorySlots.getSlot(0).getHasStack())
|
||||
this.drawTexturedModalRect(left + 7, top + 22, 0, 166, 162, 42);
|
||||
}
|
||||
}
|
||||
@ -277,8 +277,8 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_schrabidium_battery, 1), new AStack[] {new OreDictStack(DESH.ingot(), 4), new OreDictStack(NP237.dust(), 12), new OreDictStack(SA326.dust(), 12), new OreDictStack(SA326.ingot(), 2), new ComparableStack(ModItems.wire_schrabidium, 4), },800);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_dineutronium_battery, 1), new AStack[] {new OreDictStack(DNT.ingot(), 24), new ComparableStack(ModItems.powder_spark_mix, 12), new ComparableStack(ModItems.battery_spark_cell_1000, 1), new OreDictStack(CMB.ingot(), 32), new ComparableStack(ModItems.coil_magnetized_tungsten, 8), },1600);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_shredder, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 8), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModBlocks.steel_beam, 2), new ComparableStack(Blocks.iron_bars, 2) },200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_well, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 20), new ComparableStack(ModBlocks.steel_beam, 8), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.pipes_steel, 3), new ComparableStack(ModItems.drill_titanium, 1), new ComparableStack(ModItems.wire_red_copper, 6), },250);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_pumpjack, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 8), new OreDictStack(STEEL.plateWelded(), 8), new ComparableStack(ModItems.pipes_steel, 4), new ComparableStack(ModItems.tank_steel, 4), new OreDictStack(STEEL.plate(), 32), new ComparableStack(ModItems.drill_titanium, 1), new ComparableStack(ModItems.motor, 2) }, 400);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_well, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 20), new ComparableStack(ModBlocks.steel_beam, 8), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.pipes_steel, 1), new ComparableStack(ModItems.drill_titanium, 1), new ComparableStack(ModItems.wire_red_copper, 6), },250);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_pumpjack, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 8), new OreDictStack(STEEL.plateWelded(), 8), new ComparableStack(ModItems.pipes_steel, 4), new ComparableStack(ModItems.tank_steel, 4), new OreDictStack(STEEL.plate(), 32), new ComparableStack(ModItems.drill_titanium, 1), new ComparableStack(ModItems.motor_desh) }, 400);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_flare, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(IRON.ingot(), 12), new OreDictStack(CU.plate528(), 4), new ComparableStack(ModItems.tank_steel, 1), new ComparableStack(ModBlocks.deco_pipe_quad, 8), new ComparableStack(ModItems.hull_small_steel, 4), new ComparableStack(ModItems.thermo_element, 3), },200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_coker, 1), new AStack[] {!exp ? new OreDictStack(STEEL.plateWelded(), 3) : new OreDictStack(STEEL.heavyComp(), 2), new OreDictStack(IRON.ingot(), 16), new OreDictStack(CU.plate528(), 8), new OreDictStack(RUBBER.ingot(), 4), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModBlocks.steel_grate, 4) },200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_refinery, 1), new AStack[] {!exp ? new OreDictStack(STEEL.plateWelded(), 3) : new OreDictStack(STEEL.heavyComp(), 1), new OreDictStack(CU.plate528(), 16), new ComparableStack(ModItems.hull_big_steel, 6), new ComparableStack(ModItems.pipes_steel, 2), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.circuit_red_copper, 1) },350);
|
||||
|
||||
@ -0,0 +1,78 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class LemegetonRecipes {
|
||||
|
||||
public static HashMap<AStack, ItemStack> recipes = new HashMap();
|
||||
|
||||
public static void register() {
|
||||
recipes.put(new OreDictStack(IRON.ingot()), new ItemStack(ModItems.ingot_steel));
|
||||
recipes.put(new OreDictStack(STEEL.ingot()), new ItemStack(ModItems.ingot_dura_steel));
|
||||
recipes.put(new OreDictStack(DURA.ingot()), new ItemStack(ModItems.ingot_tcalloy));
|
||||
recipes.put(new OreDictStack(TCALLOY.ingot()), new ItemStack(ModItems.ingot_combine_steel));
|
||||
recipes.put(new OreDictStack(CMB.ingot()), new ItemStack(ModItems.ingot_dineutronium));
|
||||
|
||||
recipes.put(new OreDictStack(TI.ingot()), new ItemStack(ModItems.ingot_saturnite));
|
||||
recipes.put(new OreDictStack(BIGMT.ingot()), new ItemStack(ModItems.ingot_starmetal));
|
||||
|
||||
recipes.put(new OreDictStack(CU.ingot()), new ItemStack(ModItems.ingot_red_copper));
|
||||
recipes.put(new OreDictStack(MINGRADE.ingot()), new ItemStack(ModItems.ingot_advanced_alloy));
|
||||
recipes.put(new OreDictStack(ALLOY.ingot()), new ItemStack(ModItems.ingot_desh));
|
||||
|
||||
recipes.put(new OreDictStack(PB.ingot()), new ItemStack(Items.gold_ingot));
|
||||
recipes.put(new OreDictStack(GOLD.ingot()), new ItemStack(ModItems.ingot_bismuth));
|
||||
recipes.put(new OreDictStack(BI.ingot()), new ItemStack(ModItems.ingot_osmiridium));
|
||||
|
||||
recipes.put(new OreDictStack(TH232.ingot()), new ItemStack(ModItems.ingot_uranium));
|
||||
recipes.put(new OreDictStack(U.ingot()), new ItemStack(ModItems.ingot_u238));
|
||||
recipes.put(new OreDictStack(U238.ingot()), new ItemStack(ModItems.ingot_u235));
|
||||
recipes.put(new OreDictStack(U235.ingot()), new ItemStack(ModItems.ingot_plutonium));
|
||||
recipes.put(new OreDictStack(PU.ingot()), new ItemStack(ModItems.ingot_pu238));
|
||||
recipes.put(new OreDictStack(PU238.ingot()), new ItemStack(ModItems.ingot_pu239));
|
||||
recipes.put(new OreDictStack(PU239.ingot()), new ItemStack(ModItems.ingot_pu240));
|
||||
recipes.put(new OreDictStack(PU240.ingot()), new ItemStack(ModItems.ingot_pu241));
|
||||
recipes.put(new OreDictStack(PU241.ingot()), new ItemStack(ModItems.ingot_am241));
|
||||
recipes.put(new OreDictStack(AM241.ingot()), new ItemStack(ModItems.ingot_am242));
|
||||
|
||||
recipes.put(new OreDictStack(RA226.ingot()), new ItemStack(ModItems.ingot_polonium));
|
||||
recipes.put(new OreDictStack(PO210.ingot()), new ItemStack(ModItems.ingot_technetium));
|
||||
|
||||
recipes.put(new OreDictStack(POLYMER.ingot()), new ItemStack(ModItems.ingot_pc));
|
||||
recipes.put(new OreDictStack(BAKELITE.ingot()), new ItemStack(ModItems.ingot_pvc));
|
||||
recipes.put(new OreDictStack(LATEX.ingot()), new ItemStack(ModItems.ingot_rubber));
|
||||
|
||||
recipes.put(new OreDictStack(COAL.gem()), new ItemStack(ModItems.ingot_graphite));
|
||||
recipes.put(new OreDictStack(GRAPHITE.ingot()), new ItemStack(Items.diamond));
|
||||
recipes.put(new OreDictStack(DIAMOND.gem()), new ItemStack(ModItems.ingot_cft));
|
||||
|
||||
recipes.put(new OreDictStack(F.dust()), new ItemStack(ModItems.gem_sodalite));
|
||||
recipes.put(new OreDictStack(SODALITE.gem()), new ItemStack(ModItems.gem_volcanic));
|
||||
recipes.put(new OreDictStack(VOLCANIC.gem()), new ItemStack(ModItems.gem_rad));
|
||||
recipes.put(new ComparableStack(ModItems.gem_rad), new ItemStack(ModItems.gem_alexandrite));
|
||||
|
||||
recipes.put(new OreDictStack(KEY_SAND), new ItemStack(ModItems.ingot_fiberglass));
|
||||
recipes.put(new OreDictStack(FIBER.ingot()), new ItemStack(ModItems.ingot_asbestos));
|
||||
}
|
||||
|
||||
public static ItemStack getRecipe(ItemStack ingredient) {
|
||||
|
||||
for(Entry<AStack, ItemStack> entry : recipes.entrySet()) {
|
||||
if(entry.getKey().matchesRecipe(ingredient, true)) {
|
||||
return entry.getValue().copy();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -16,6 +16,7 @@ import com.hbm.interfaces.Untested;
|
||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.items.ItemEnums.EnumChunkType;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemBedrockOre.EnumBedrockOre;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -205,6 +206,8 @@ public class ShredderRecipes extends SerializableRecipe {
|
||||
ShredderRecipes.setRecipe(Items.apple, new ItemStack(Items.sugar, 1));
|
||||
ShredderRecipes.setRecipe(Items.carrot, new ItemStack(Items.sugar, 1));
|
||||
ShredderRecipes.setRecipe(ModItems.can_empty, new ItemStack(ModItems.powder_aluminium, 2));
|
||||
ShredderRecipes.setRecipe(ModBlocks.machine_well, new ItemStack(ModItems.powder_steel, 32));
|
||||
ShredderRecipes.setRecipe(DictFrame.fromOne(ModItems.chunk_ore, EnumChunkType.RARE), new ItemStack(ModItems.powder_desh_mix));
|
||||
|
||||
List<ItemStack> logs = OreDictionary.getOres("logWood");
|
||||
List<ItemStack> planks = OreDictionary.getOres("plankWood");
|
||||
|
||||
@ -13,6 +13,7 @@ import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.recipes.AssemblerRecipes;
|
||||
import com.hbm.items.ItemAmmoEnums.*;
|
||||
import com.hbm.items.ItemEnums.EnumChunkType;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.food.ItemFlask.EnumInfusion;
|
||||
|
||||
@ -703,6 +704,20 @@ public class AnvilRecipes {
|
||||
|
||||
public static void registerConstructionRecycling() {
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new ComparableStack(DictFrame.fromOne(ModItems.chunk_ore, EnumChunkType.RARE)),
|
||||
new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.fragment_boron)),
|
||||
new AnvilOutput(new ItemStack(ModItems.fragment_boron), 0.5F),
|
||||
new AnvilOutput(new ItemStack(ModItems.fragment_lanthanium), 0.1F),
|
||||
new AnvilOutput(new ItemStack(ModItems.fragment_cobalt)),
|
||||
new AnvilOutput(new ItemStack(ModItems.fragment_cobalt), 0.5F),
|
||||
new AnvilOutput(new ItemStack(ModItems.fragment_cerium), 0.1F),
|
||||
new AnvilOutput(new ItemStack(ModItems.fragment_neodymium), 0.5F),
|
||||
new AnvilOutput(new ItemStack(ModItems.fragment_niobium), 0.5F),
|
||||
}
|
||||
).setTier(2));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new ComparableStack(ModBlocks.heater_firebox),
|
||||
new AnvilOutput[] {
|
||||
|
||||
@ -50,6 +50,10 @@ public class ItemEnums {
|
||||
MUSTARDWILLOW
|
||||
}
|
||||
|
||||
public static enum EnumChunkType {
|
||||
RARE
|
||||
}
|
||||
|
||||
public static enum EnumAchievementType {
|
||||
GOFISH,
|
||||
ACID,
|
||||
|
||||
@ -552,6 +552,7 @@ public class ModItems {
|
||||
public static Item fragment_boron;
|
||||
public static Item fragment_meteorite;
|
||||
public static Item fragment_coltan;
|
||||
public static Item chunk_ore;
|
||||
|
||||
public static Item biomass;
|
||||
public static Item biomass_compressed;
|
||||
@ -2384,6 +2385,7 @@ public class ModItems {
|
||||
public static Item book_secret;
|
||||
public static Item book_of_;
|
||||
public static Item page_of_;
|
||||
public static Item book_lemegeton;
|
||||
public static Item burnt_bark;
|
||||
|
||||
public static Item smoke1;
|
||||
@ -2983,6 +2985,7 @@ public class ModItems {
|
||||
fragment_boron = new Item().setUnlocalizedName("fragment_boron").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":fragment_boron");
|
||||
fragment_meteorite = new Item().setUnlocalizedName("fragment_meteorite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":fragment_meteorite");
|
||||
fragment_coltan = new Item().setUnlocalizedName("fragment_coltan").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":fragment_coltan");
|
||||
chunk_ore = new ItemEnumMulti(EnumChunkType.class, true, true).setUnlocalizedName("chunk_ore").setCreativeTab(MainRegistry.partsTab);
|
||||
|
||||
biomass = new Item().setUnlocalizedName("biomass").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":biomass");
|
||||
biomass_compressed = new Item().setUnlocalizedName("biomass_compressed").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":biomass_compressed");
|
||||
@ -5458,6 +5461,7 @@ public class ModItems {
|
||||
book_secret = new ItemCustomLore().setUnlocalizedName("book_secret").setCreativeTab(MainRegistry.polaroidID == 11 ? MainRegistry.consumableTab : null).setTextureName(RefStrings.MODID + ":book_secret");
|
||||
book_of_ = new ItemBook().setUnlocalizedName("book_of_").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":book_of_");
|
||||
page_of_ = new ItemEnumMulti(ItemEnums.EnumPages.class, true, false).setUnlocalizedName("page_of_").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":page_of_");
|
||||
book_lemegeton = new ItemBookLemegeton().setUnlocalizedName("book_lemegeton").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":book_lemegeton");
|
||||
burnt_bark = new ItemCustomLore().setUnlocalizedName("burnt_bark").setCreativeTab(null).setTextureName(RefStrings.MODID + ":burnt_bark");
|
||||
|
||||
smoke1 = new Item().setUnlocalizedName("smoke1").setTextureName(RefStrings.MODID + ":smoke1");
|
||||
@ -5970,6 +5974,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(fragment_boron, fragment_boron.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fragment_meteorite, fragment_meteorite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fragment_coltan, fragment_coltan.getUnlocalizedName());
|
||||
GameRegistry.registerItem(chunk_ore, chunk_ore.getUnlocalizedName());
|
||||
|
||||
//Things that look like rotten flesh but aren't
|
||||
GameRegistry.registerItem(biomass, biomass.getUnlocalizedName());
|
||||
@ -8055,6 +8060,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(book_secret, book_secret.getUnlocalizedName());
|
||||
GameRegistry.registerItem(book_of_, book_of_.getUnlocalizedName());
|
||||
GameRegistry.registerItem(page_of_, page_of_.getUnlocalizedName());
|
||||
GameRegistry.registerItem(book_lemegeton, book_lemegeton.getUnlocalizedName());
|
||||
GameRegistry.registerItem(burnt_bark, burnt_bark.getUnlocalizedName());
|
||||
|
||||
//Kits
|
||||
|
||||
@ -43,37 +43,4 @@ public class ItemBook extends Item implements IGUIProvider {
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIBook(player.inventory);
|
||||
}
|
||||
|
||||
/*@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
if(world.isRemote)
|
||||
return stack;
|
||||
|
||||
if(!player.isSneaking()) {
|
||||
List list = world.getEntitiesWithinAABBExcludingEntity(player, AxisAlignedBB.getBoundingBox(player.posX - 10, player.posY - 2, player.posZ - 10, player.posX + 10, player.posY + 2, player.posZ + 10));
|
||||
|
||||
for(Object o : list) {
|
||||
|
||||
if(o instanceof EntityLivingBase) {
|
||||
EntityLivingBase entity = (EntityLivingBase)o;
|
||||
|
||||
entity.addPotionEffect(new PotionEffect(HbmPotion.telekinesis.id, 20, 0));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(player.inventory.hasItemStack(new ItemStack(ModItems.ingot_u238m2, 1, 1)) &&
|
||||
player.inventory.hasItemStack(new ItemStack(ModItems.ingot_u238m2, 1, 2)) &&
|
||||
player.inventory.hasItemStack(new ItemStack(ModItems.ingot_u238m2, 1, 3))) {
|
||||
player.inventory.clearInventory(ModItems.ingot_u238m2, 1);
|
||||
player.inventory.clearInventory(ModItems.ingot_u238m2, 2);
|
||||
player.inventory.clearInventory(ModItems.ingot_u238m2, 3);
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_u238m2));
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
}
|
||||
}
|
||||
|
||||
return stack;
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
35
src/main/java/com/hbm/items/tool/ItemBookLemegeton.java
Normal file
35
src/main/java/com/hbm/items/tool/ItemBookLemegeton.java
Normal file
@ -0,0 +1,35 @@
|
||||
package com.hbm.items.tool;
|
||||
|
||||
import com.hbm.inventory.container.ContainerLemegeton;
|
||||
import com.hbm.inventory.gui.GUILemegeton;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemBookLemegeton extends Item implements IGUIProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
if(!world.isRemote) player.openGui(MainRegistry.instance, 0, world, 0, 0, 0);
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerLemegeton(player.inventory);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUILemegeton(player.inventory);
|
||||
}
|
||||
}
|
||||
@ -843,6 +843,7 @@ public class MainRegistry {
|
||||
TileEntityNukeFurnace.registerFuels();
|
||||
AssemblerRecipes.loadRecipes();
|
||||
MagicRecipes.register();
|
||||
LemegetonRecipes.register();
|
||||
SILEXRecipes.register();
|
||||
AnvilRecipes.register();
|
||||
RefineryRecipes.registerRefinery();
|
||||
|
||||
@ -1,79 +0,0 @@
|
||||
package com.hbm.world.feature;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.NoiseGeneratorPerlin;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.event.terraingen.DecorateBiomeEvent;
|
||||
|
||||
public class DeepLayer {
|
||||
|
||||
NoiseGeneratorPerlin noise;
|
||||
|
||||
@SubscribeEvent
|
||||
public void onDecorate(DecorateBiomeEvent.Pre event) {
|
||||
|
||||
World world = event.world;
|
||||
if(world.provider == null || world.provider.dimensionId != 0) return;
|
||||
|
||||
if(this.noise == null) {
|
||||
this.noise = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + 19), 4);
|
||||
}
|
||||
|
||||
int cX = event.chunkX;
|
||||
int cZ = event.chunkZ;
|
||||
|
||||
double scale = 0.01D;
|
||||
int threshold = 2;
|
||||
|
||||
for(int x = cX + 8; x < cX + 24; x++) {
|
||||
for(int z = cZ + 8; z < cZ + 24; z++) {
|
||||
|
||||
double n = noise.func_151601_a(x * scale, z * scale);
|
||||
|
||||
if(n > threshold) {
|
||||
int range = (int)((n - threshold) * 8);
|
||||
|
||||
if(range > 24)
|
||||
range = 48 - range;
|
||||
|
||||
if(range < 0)
|
||||
continue;
|
||||
|
||||
for(int y = 1; y <= range; y++) {
|
||||
|
||||
Block target = world.getBlock(x, y, z);
|
||||
|
||||
if(target.isNormalCube() && target.getMaterial() == Material.rock && target.isReplaceableOreGen(world, x, y, z, Blocks.stone)) {
|
||||
|
||||
boolean lava = false;
|
||||
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
Block neighbor = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
||||
if(neighbor.getMaterial() == Material.lava) {
|
||||
lava = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(lava || world.rand.nextInt(10) == 0) {
|
||||
world.setBlock(x, y, z, ModBlocks.stone_deep_cobble, 1, 2);
|
||||
} else if(world.rand.nextInt(10) == 0 && world.getBlock(x, y + 1, z).getMaterial() == Material.air) {
|
||||
world.setBlock(x, y, z, ModBlocks.stone_deep_cobble, 2, 2);
|
||||
} else {
|
||||
world.setBlock(x, y, z, ModBlocks.stone_deep_cobble, 0, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1301,6 +1301,7 @@ item.bomb_caller.name=Luftschlag Zielmarker
|
||||
item.bomb_waffle.name=Massenvernichtungswaffel
|
||||
item.guide_book.name=Handbuch
|
||||
item.book_of_.name=Das Buch der Güterwagons
|
||||
item.book_lemegeton.name=Lemegeton
|
||||
item.book_secret.name=3-596-50802-9
|
||||
item.bottle2_empty.name=Leere Glasflasche
|
||||
item.bottle2_fritz.name=Fritz-Kola
|
||||
@ -1472,6 +1473,7 @@ item.chopper_head.name=Jagdschrauber Cockpit
|
||||
item.chopper_tail.name=Jagdschrauber Heck
|
||||
item.chopper_torso.name=Jagdschrauber Rumpf
|
||||
item.chopper_wing.name=Jagdschrauber Seitentragfläche
|
||||
item.chunk_ore.rare.name=Seltenerdenerz-Brocken
|
||||
item.cigarette.name=FFI-Markenzigarette
|
||||
item.cinnebar.name=Zinnober
|
||||
item.circuit_aluminium.name=Einfacher Schaltkreis
|
||||
|
||||
@ -1969,6 +1969,7 @@ item.bomb_caller.name=Airstrike Designator
|
||||
item.bomb_waffle.name=Waffle of Mass Destruction
|
||||
item.book_guide.name=Guide Book
|
||||
item.book_of_.name=The Book of Boxcars
|
||||
item.book_lemegeton.name=Lemegeton
|
||||
item.book_secret.name=3-596-50802-9
|
||||
item.bottle2_empty.name=Empty Bottle
|
||||
item.bottle2_fritz.name=Fritz Cola
|
||||
@ -2169,6 +2170,7 @@ item.chopper_head.name=Hunter Chopper Cockpit
|
||||
item.chopper_tail.name=Hunter Chopper Tail
|
||||
item.chopper_torso.name=Hunter Chopper Body
|
||||
item.chopper_wing.name=Hunter Chopper Wing
|
||||
item.chunk_ore.rare.name=Rare Earth Ore Chunk
|
||||
item.cigarette.name=FFI-Brand Cigarette
|
||||
item.cinnebar.name=Cinnabar
|
||||
item.circuit_aluminium.name=Basic Circuit
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
BIN
src/main/resources/assets/hbm/textures/items/book_lemegeton.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/book_lemegeton.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 982 B |
BIN
src/main/resources/assets/hbm/textures/items/chunk_base.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/chunk_base.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 309 B |
BIN
src/main/resources/assets/hbm/textures/items/chunk_ore.rare.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/chunk_ore.rare.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 452 B |
Loading…
x
Reference in New Issue
Block a user