reasim boilers, RBMK deco blocks, recipes

This commit is contained in:
Bob 2021-08-15 14:59:26 +02:00
parent 55749552dd
commit 744c64bd81
18 changed files with 290 additions and 87 deletions

View File

@ -253,6 +253,8 @@ public class ModBlocks {
public static Block deco_lead;
public static Block deco_beryllium;
public static Block deco_asbestos;
public static Block deco_rbmk;
public static Block deco_rbmk_smooth;
public static Block hazmat;
@ -1357,6 +1359,8 @@ public class ModBlocks {
deco_lead = new BlockOre(Material.iron).setBlockName("deco_lead").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_lead");
deco_beryllium = new BlockOre(Material.iron).setBlockName("deco_beryllium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_beryllium");
deco_asbestos = new BlockOutgas(Material.cloth, true, 5, true).setBlockName("deco_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_asbestos");
deco_rbmk = new BlockGeneric(Material.iron).setBlockName("deco_rbmk").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_side");
deco_rbmk_smooth = new BlockGeneric(Material.iron).setBlockName("deco_rbmk_smooth").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_top");
hazmat = new BlockGeneric(Material.cloth).setBlockName("hazmat").setStepSound(Block.soundTypeCloth).setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":hazmat");
@ -2284,6 +2288,8 @@ public class ModBlocks {
GameRegistry.registerBlock(deco_beryllium, deco_beryllium.getUnlocalizedName());
GameRegistry.registerBlock(deco_asbestos, deco_asbestos.getUnlocalizedName());
GameRegistry.registerBlock(hazmat, hazmat.getUnlocalizedName());
GameRegistry.registerBlock(deco_rbmk, deco_rbmk.getUnlocalizedName());
GameRegistry.registerBlock(deco_rbmk_smooth, deco_rbmk_smooth.getUnlocalizedName());
//Gravel
GameRegistry.registerBlock(gravel_obsidian, gravel_obsidian.getUnlocalizedName());

View File

@ -54,6 +54,7 @@ public class ConsumableRecipes {
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.coffee), new Object[] { "dustCoal", Items.milk_bucket, Items.potionitem, Items.sugar }));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.coffee_radium), new Object[] { ModItems.coffee, ModItems.nugget_ra226 });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_smore), new Object[] { Items.wheat, new ItemStack(ModItems.marshmallow, 1, 1), new ItemStack(Items.dye, 1, 3) });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.marshmallow), new Object[] { Items.stick, Items.sugar, Items.wheat_seeds });
//Peas
GameRegistry.addRecipe(new ItemStack(ModItems.peas), new Object[] { " S ", "SNS", " S ", 'S', Items.wheat_seeds, 'N', Items.gold_nugget });

View File

@ -44,6 +44,10 @@ public class MKUCraftingHandler implements IRecipe {
public static void generateRecipe(World world) {
Random rand = new Random(world.getSeed());
if(lastSeed == world.getSeed() && MKURecipe != null)
return;
lastSeed = world.getSeed();
List<ItemStack> list = Arrays.asList(new ItemStack[] {

View File

@ -475,16 +475,19 @@ public class AnvilRecipes {
public AnvilConstructionRecipe setTier(int tier) {
this.tierLower = tier;
if(GeneralConfig.enableBabyMode) this.tierLower = 1;
return this;
}
public AnvilConstructionRecipe setTierRange(int lower, int upper) {
this.tierLower = lower;
this.tierUpper = upper;
if(GeneralConfig.enableBabyMode) this.tierLower = this.tierUpper = 1;
return this;
}
public boolean isTierValid(int tier) {
if(this.tierUpper == -1)
return tier >= this.tierLower;

View File

@ -2,6 +2,7 @@ package com.hbm.inventory;
import java.util.List;
import com.hbm.config.GeneralConfig;
import com.hbm.inventory.RecipesCommon.AStack;
import net.minecraft.item.ItemStack;
@ -19,6 +20,7 @@ public class AnvilSmithingRecipe {
this.output = out;
this.left = left;
this.right = right;
if(GeneralConfig.enableBabyMode) this.tier = 1;
}
public AnvilSmithingRecipe makeShapeless() {

View File

@ -42,10 +42,25 @@ public class ShredderRecipes {
generateRecipes("ingot", name, matches, 1);
generateRecipes("ore", name, matches, 2);
generateRecipes("block", name, matches, 9);
generateRecipes("gem", name, matches, 1);
generateRecipes("crystal", name, matches, 1);
if(name.length() > 5 && name.substring(0, 5).equals("block")) {
ItemStack dust = getDustByName(name.substring(5));
if(dust != null && dust.getItem() != ModItems.scrap) {
dust.stackSize = 9;
if(getIngotOrGemByName(name.substring(5)) == null)
dust.stackSize = 4;
for(ItemStack stack : matches) {
putIfValid(stack, dust, name);
}
}
}
if(name.length() > 3 && name.substring(0, 4).equals("dust")) {
for(ItemStack stack : matches) {
putIfValid(stack, new ItemStack(ModItems.dust), name);
@ -253,6 +268,11 @@ public class ShredderRecipes {
}
}
/**
* Returns scrap when no dust is found, for quickly adding recipes
* @param name
* @return
*/
public static ItemStack getDustByName(String name) {
List<ItemStack> matches = OreDictionary.getOres("dust" + name);
@ -263,6 +283,26 @@ public class ShredderRecipes {
return new ItemStack(ModItems.scrap);
}
/**
* Returns null when no ingot or gem is found, for deciding whether the block shredding output shoiuld be 9 or 4 dusts
* @param name
* @return
*/
public static ItemStack getIngotOrGemByName(String name) {
List<ItemStack> matches = OreDictionary.getOres("ingot" + name);
if(matches != null && !matches.isEmpty())
return matches.get(0).copy();
matches = OreDictionary.getOres("gem" + name);
if(matches != null && !matches.isEmpty())
return matches.get(0).copy();
return null;
}
public static void setRecipe(Item in, ItemStack out) {
shredderRecipes.put(new ComparableStack(in), out);

View File

@ -3114,7 +3114,7 @@ public class ModItems {
syringe_metal_psycho = new ItemSyringe().setUnlocalizedName("syringe_metal_psycho").setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":syringe_metal_psycho");
syringe_metal_super = new ItemSyringe().setUnlocalizedName("syringe_metal_super").setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":syringe_metal_super");
syringe_taint = new ItemSyringe().setUnlocalizedName("syringe_taint").setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":syringe_taint");
syringe_mkunicorn = new ItemSyringe().setUnlocalizedName("syringe_mkunicorn").setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":syringe_mkunicorn");
syringe_mkunicorn = new ItemSyringe().setUnlocalizedName("syringe_mkunicorn").setFull3D().setCreativeTab(null).setTextureName(RefStrings.MODID + ":syringe_mkunicorn");
med_bag = new ItemSyringe().setUnlocalizedName("med_bag").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":med_bag");
radaway = new ItemSyringe().setUnlocalizedName("radaway").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":radaway");
radaway_strong = new ItemSyringe().setUnlocalizedName("radaway_strong").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":radaway_strong");

View File

@ -4,6 +4,7 @@ import java.util.List;
import com.hbm.entity.mob.EntityBlockSpider;
import com.hbm.lib.Library;
import com.hbm.world.generator.CellularDungeonFactory;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
@ -28,11 +29,13 @@ public class ItemWandD extends Item {
//int y = world.getHeightValue(x, z);
int y = pos.blockY;
EntityBlockSpider spider = new EntityBlockSpider(world);
CellularDungeonFactory.meteor.generate(world, x, y, z, world.rand);
/*EntityBlockSpider spider = new EntityBlockSpider(world);
spider.setPosition(x + 0.5, y, z + 0.5);
spider.makeBlock(world.getBlock(x, y, z), world.getBlockMetadata(x, y, z));
world.setBlockToAir(x, y, z);
world.spawnEntityInWorld(spider);
world.spawnEntityInWorld(spider);*/
/*NBTTagCompound data = new NBTTagCompound();

View File

@ -475,6 +475,13 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapelessOreRecipe(ItemBattery.getFullBattery(ModItems.battery_potatos), new Object[] { ItemBattery.getFullBattery(ModItems.battery_potato), ModItems.turret_chip, "dustRedstone" }));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_steam), new Object[] { "PMP", "ISI", "PCP", 'P', "plateCopper", 'M', ModItems.motor, 'C', ModItems.coil_tungsten, 'S', new ItemStack(ModItems.fluid_tank_full, 1, FluidType.WATER.getID()), 'I', ModItems.plate_polymer }));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_steam_large), new Object[] { "MPM", "ISI", "CPC", 'P', ModItems.board_copper, 'M', ModItems.motor, 'C', ModItems.coil_tungsten, 'S', new ItemStack(ModItems.fluid_barrel_full, 1, FluidType.WATER.getID()), 'I', "ingotPolymer" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_sc_uranium), new Object[] { "NBN", "PCP", "NBN", 'N', "nuggetGold", 'B', ModItems.billet_u238, 'P', "plateLead", 'C', ModItems.thermo_element }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_sc_technetium), new Object[] { "NBN", "PCP", "NBN", 'N', "nuggetGold", 'B', ModItems.billet_technetium, 'P', "plateLead", 'C', ModItems.battery_sc_uranium }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_sc_plutonium), new Object[] { "NBN", "PCP", "NBN", 'N', "nuggetTechnetium99", 'B', ModItems.billet_pu238, 'P', "plateLead", 'C', ModItems.battery_sc_technetium }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_sc_polonium), new Object[] { "NBN", "PCP", "NBN", 'N', "nuggetTechnetium99", 'B', ModItems.billet_polonium, 'P', ModItems.ingot_polymer, 'C', ModItems.battery_sc_plutonium }));
GameRegistry.addRecipe(new ItemStack(ModItems.battery_sc_gold), new Object[] { "NBN", "PCP", "NBN", 'N', ModItems.nugget_tantalium, 'B', ModItems.billet_au198, 'P', ModItems.ingot_polymer, 'C', ModItems.battery_sc_polonium });
GameRegistry.addRecipe(new ItemStack(ModItems.battery_sc_americium), new Object[] { "NBN", "PCP", "NBN", 'N', ModItems.nugget_tantalium, 'B', ModItems.billet_am241, 'P', ModItems.ingot_polymer, 'C', ModItems.battery_sc_gold });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.wiring_red_copper, 1), new Object[] { "PPP", "PIP", "PPP", 'P', "plateSteel", 'I', "ingotSteel" }));
@ -739,7 +746,6 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModBlocks.rbmk_control, 1), new Object[] { " B ", "GRG", " B ", 'G', ModItems.ingot_graphite, 'B', ModItems.motor, 'R', ModBlocks.rbmk_absorber });
GameRegistry.addRecipe(new ItemStack(ModBlocks.rbmk_control_mod, 1), new Object[] { "BGB", "GRG", "BGB", 'G', ModBlocks.block_graphite, 'R', ModBlocks.rbmk_control, 'B', ModItems.nugget_bismuth });
GameRegistry.addRecipe(new ItemStack(ModBlocks.rbmk_control_auto, 1), new Object[] { "C", "R", "C", 'C', ModItems.circuit_targeting_tier1, 'R', ModBlocks.rbmk_control });
GameRegistry.addRecipe(new ItemStack(ModBlocks.rbmk_boiler, 1), new Object[] { "CPC", "CRC", "CPC", 'C', ModItems.board_copper, 'P', ModItems.pipes_steel, 'R', ModBlocks.rbmk_blank });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rbmk_rod_reasim, 1), new Object[] { "ZCZ", "ZRZ", "ZCZ", 'C', ModItems.hull_small_steel, 'R', ModBlocks.rbmk_blank, 'Z', "ingotZirconium" }));
GameRegistry.addRecipe(new ItemStack(ModBlocks.rbmk_rod_reasim_mod, 1), new Object[] { "BGB", "GRG", "BGB", 'G', ModBlocks.block_graphite, 'R', ModBlocks.rbmk_rod_reasim, 'B', ModItems.ingot_tcalloy });
GameRegistry.addRecipe(new ItemStack(ModBlocks.rbmk_outgasser, 1), new Object[] { "GHG", "GRG", "GTG", 'G', ModBlocks.steel_grate, 'H', Blocks.hopper, 'T', ModItems.tank_steel, 'R', ModBlocks.rbmk_blank });
@ -747,6 +753,11 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rbmk_steam_inlet, 1), new Object[] { "SCS", "CBC", "SCS", 'S', "ingotSteel", 'C', "plateIron", 'B', ModItems.tank_steel }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rbmk_steam_outlet, 1), new Object[] { "SCS", "CBC", "SCS", 'S', "ingotSteel", 'C', "plateCopper", 'B', ModItems.tank_steel }));
GameRegistry.addRecipe(new ItemStack(ModBlocks.deco_rbmk, 8), new Object[] { "R", 'R', ModBlocks.rbmk_blank });
GameRegistry.addRecipe(new ItemStack(ModBlocks.deco_rbmk_smooth, 1), new Object[] { "R", 'R', ModBlocks.deco_rbmk });
GameRegistry.addRecipe(new ItemStack(ModBlocks.rbmk_blank, 1), new Object[] { "RRR", "R R", "RRR", 'R', ModBlocks.deco_rbmk });
GameRegistry.addRecipe(new ItemStack(ModBlocks.rbmk_blank, 1), new Object[] { "RRR", "R R", "RRR", 'R', ModBlocks.deco_rbmk_smooth });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.ladder_sturdy, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', "plankWood" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.ladder_iron, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', "ingotIron" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.ladder_gold, 8), new Object[] { "LLL", "L#L", "LLL", 'L', Blocks.ladder, '#', "ingotGold" }));
@ -840,6 +851,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModBlocks.hadron_core, 1), new Object[] { "CCC", "DSD", "CCC", 'C', ModBlocks.hadron_coil_alloy, 'D', ModBlocks.hadron_diode, 'S', ModItems.circuit_schrabidium });
GameRegistry.addRecipe(new ItemStack(ModBlocks.rbmk_rod, 1), new Object[] { "C", "R", "C", 'C', ModItems.hull_small_steel, 'R', ModBlocks.rbmk_blank });
GameRegistry.addRecipe(new ItemStack(ModBlocks.rbmk_rod_mod, 1), new Object[] { "BGB", "GRG", "BGB", 'G', ModBlocks.block_graphite, 'R', ModBlocks.rbmk_rod, 'B', ModItems.nugget_bismuth });
GameRegistry.addRecipe(new ItemStack(ModBlocks.rbmk_boiler, 1), new Object[] { "CPC", "CRC", "CPC", 'C', ModItems.board_copper, 'P', ModItems.pipes_steel, 'R', ModBlocks.rbmk_blank });
}
}

View File

@ -373,12 +373,12 @@ public class ModEventHandler {
ItemStack cladding = mods[ArmorModHandler.cladding];
if(cladding != null && cladding.getItem() == ModItems.cladding_obsidian) {
ReflectionHelper.setPrivateValue(Entity.class, event.entityItem, true, "field_149500_a", "invulnerable");
ReflectionHelper.setPrivateValue(Entity.class, event.entityItem, true, "field_149119_a", "field_83001_bt", "field_149500_a", "invulnerable");
}
}
if(yeet.getItem() == ModItems.bismuth_tool) {
ReflectionHelper.setPrivateValue(Entity.class, event.entityItem, true, "field_149500_a", "invulnerable");
ReflectionHelper.setPrivateValue(Entity.class, event.entityItem, true, "field_149119_a", "field_83001_bt", "field_149500_a", "invulnerable");
}
}

View File

@ -26,57 +26,57 @@ public class RenderCore extends TileEntitySpecialRenderer {
private static final Random random = new Random(31100L);
FloatBuffer buffer = GLAllocation.createDirectFloatBuffer(16);
@Override
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
TileEntityCore core = (TileEntityCore)tileEntity;
if(core.heat == 0) {
renderStandby(x, y, z);
} else {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
GL11.glRotatef(-RenderManager.instance.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(RenderManager.instance.playerViewX - 90, 1.0F, 0.0F, 0.0F);
GL11.glTranslated(-0.5, -0.5, -0.5);
renderOrb(core, 0, 0, 0);
GL11.glPopMatrix();
}
}
public void renderStandby(double x, double y, double z) {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glScalef(0.25F, 0.25F, 0.25F);
GL11.glColor3f(0.5F, 0.5F, 0.5F);
ResourceManager.sphere_uv.renderAll();
TileEntityCore core = (TileEntityCore) tileEntity;
if(core.heat == 0) {
renderStandby(x, y, z);
} else {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
/*GL11.glRotatef(-RenderManager.instance.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(RenderManager.instance.playerViewX - 90, 1.0F, 0.0F, 0.0F);
GL11.glTranslated(-0.5, -0.5, -0.5);*/
renderOrb(core, 0, 0, 0);
GL11.glPopMatrix();
}
}
public void renderStandby(double x, double y, double z) {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glScalef(0.25F, 0.25F, 0.25F);
GL11.glColor3f(0.5F, 0.5F, 0.5F);
ResourceManager.sphere_uv.renderAll();
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
GL11.glScalef(1.25F, 1.25F, 1.25F);
GL11.glColor3f(0.1F, 0.1F, 0.1F);
ResourceManager.sphere_uv.renderAll();
GL11.glScalef(1.25F, 1.25F, 1.25F);
GL11.glColor3f(0.1F, 0.1F, 0.1F);
ResourceManager.sphere_uv.renderAll();
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_LIGHTING);
if((System.currentTimeMillis() / 100) % 10 == 0) {
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_LIGHTING);
if((System.currentTimeMillis() / 100) % 10 == 0) {
for(int i = 0; i < 3; i++) {
RenderSparks.renderSpark((int) System.currentTimeMillis() / 100 + i * 10000, 0, 0, 0, 1.5F, 5, 10, 0xFFFF00, 0xFFFFFF);
RenderSparks.renderSpark((int) System.currentTimeMillis() / 50 + i * 10000, 0, 0, 0, 1.5F, 5, 10, 0xFFFF00, 0xFFFFFF);
}
}
GL11.glPopMatrix();
}
}
GL11.glPopMatrix();
}
public void renderOrb(TileEntityCore tile, double x, double y, double z) {
@ -84,7 +84,12 @@ public class RenderCore extends TileEntitySpecialRenderer {
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
int color = tile.color;
GL11.glColor3ub((byte)((color & 0xFF0000) >> 16), (byte)((color & 0x00FF00) >> 8), (byte)((color & 0x0000FF) >> 0));
float r = ((color & 0xFF0000) >> 16) / 256F;
float g = ((color & 0x00FF00) >> 8) / 256F;
float b = ((color & 0x0000FF) >> 0) / 256F;
float mod = 0.4F;
GL11.glColor3f(r * mod, g * mod, b * mod);
int tot = tile.tanks[0].getMaxFill() + tile.tanks[1].getMaxFill();
int fill = tile.tanks[0].getFill() + tile.tanks[1].getFill();
@ -96,19 +101,29 @@ public class RenderCore extends TileEntitySpecialRenderer {
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glScalef(0.5F, 0.5F, 0.5F);
GL11.glScalef(0.25F, 0.25F, 0.25F);
ResourceManager.sphere_ruv.renderAll();
GL11.glScalef(2F, 2F, 2F);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
for(int i = 6; i <= 10; i++) {
double ix = (tile.getWorldObj().getTotalWorldTime() * 0.1D) % (Math.PI * 2D);
double t = 0.8F;
float pulse = (float) ((1D / t) * Math.atan((t * Math.sin(ix)) / (1 - t * Math.cos(ix))));
pulse += 1D;
pulse /= 2D;
for(int i = 0; i <= 16; i++) {
GL11.glPushMatrix();
GL11.glScalef(i * 0.1F, i * 0.1F, i * 0.1F);
GL11.glPushMatrix();
float s = 1F + 0.25F * i;
s += (pulse * (20 - i)) * 0.125F;
GL11.glScalef(s, s, s);
ResourceManager.sphere_ruv.renderAll();
GL11.glPopMatrix();
GL11.glPopMatrix();
}
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

View File

@ -1,11 +1,15 @@
package com.hbm.tileentity.machine.rbmk;
import com.hbm.config.GeneralConfig;
import net.minecraft.util.MathHelper;
import net.minecraft.world.GameRules;
import net.minecraft.world.World;
public class RBMKDials {
public static final String KEY_SAVE_DIALS = "dialSaveDials";
public static final String KEY_PASSIVE_COOLING = "dialPassiveCooling";
public static final String KEY_COLUMN_HEAT_FLOW = "dialColumnHeatFlow";
public static final String KEY_FUEL_DIFFUSION_MOD = "dialDiffusionMod";
@ -15,7 +19,6 @@ public class RBMKDials {
public static final String KEY_BOILER_HEAT_CONSUMPTION = "dialBoilerHeatConsumption";
public static final String KEY_CONTROL_SPEED_MOD = "dialControlSpeed";
public static final String KEY_REACTIVITY_MOD = "dialReactivityMod";
public static final String KEY_SAVE_DIALS = "dialSaveDials";
public static final String KEY_OUTGASSER_MOD = "dialOutgasserSpeedMod";
public static final String KEY_SURGE_MOD = "dialControlSurgeMod";
public static final String KEY_FLUX_RANGE = "dialFluxRange";
@ -46,7 +49,7 @@ public class RBMKDials {
rules.setOrCreateGameRule(KEY_REASIM_COUNT, "6");
rules.setOrCreateGameRule(KEY_REASIM_MOD, "1.0");
rules.setOrCreateGameRule(KEY_REASIM_BOILERS, "false");
rules.setOrCreateGameRule(KEY_REASIM_BOILER_SPEED, "0.25");
rules.setOrCreateGameRule(KEY_REASIM_BOILER_SPEED, "0.05");
}
}
@ -191,7 +194,7 @@ public class RBMKDials {
* @return
*/
public static boolean getReasimBoilers(World world) {
return world.getGameRules().getGameRuleBooleanValue(KEY_REASIM_BOILERS);
return world.getGameRules().getGameRuleBooleanValue(KEY_REASIM_BOILERS) || GeneralConfig.enable528;
}
/**
@ -200,7 +203,7 @@ public class RBMKDials {
* @return [0;1]
*/
public static double getReaSimBoilerSpeed(World world) {
return MathHelper.clamp_double(shittyWorkaroundParseDouble(world.getGameRules().getGameRuleStringValue(KEY_REASIM_BOILER_SPEED), 1.0D), 0.0D, 1.0D);
return MathHelper.clamp_double(shittyWorkaroundParseDouble(world.getGameRules().getGameRuleStringValue(KEY_REASIM_BOILER_SPEED), 0.05D), 0.0D, 1.0D);
}
//why make the double representation accessible in a game rule when you can just force me to add a second pointless parsing operation?

View File

@ -13,7 +13,6 @@ import com.hbm.blocks.machine.rbmk.RBMKBase;
import com.hbm.entity.effect.EntitySpear;
import com.hbm.entity.projectile.EntityRBMKDebris;
import com.hbm.entity.projectile.EntityRBMKDebris.DebrisType;
import com.hbm.interfaces.Untested;
import com.hbm.main.MainRegistry;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.NBTPacket;
@ -108,7 +107,6 @@ public abstract class TileEntityRBMKBase extends TileEntity implements INBTPacke
/**
* The ReaSim boiler dial causes all RBMK parts to behave like boilers
*/
@Untested //none of the new reasim boiler stuff has been tested yet
private void boilWater() {
if(heat < 100D)
@ -181,10 +179,10 @@ public abstract class TileEntityRBMKBase extends TileEntity implements INBTPacke
double targetHeat = heatTot / (double)members;
int tWater = waterTot / 5;
int rWater = waterTot % 5;
int tSteam = steamTot / 5;
int rSteam = steamTot % 5;
int tWater = waterTot / members;
int rWater = waterTot % members;
int tSteam = steamTot / members;
int rSteam = steamTot % members;
for(TileEntityRBMKBase rbmk : rec) {
double delta = targetHeat - rbmk.heat;

View File

@ -18,7 +18,7 @@ public class TileEntityRBMKInlet extends TileEntity implements IFluidAcceptor {
public FluidTank water;
public TileEntityRBMKInlet() {
water = new FluidTank(FluidType.WATER, 128000, 0);
water = new FluidTank(FluidType.WATER, 32000, 0);
}
@Override

View File

@ -3,7 +3,6 @@ package com.hbm.tileentity.machine.rbmk;
import java.util.ArrayList;
import java.util.List;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.machine.rbmk.RBMKBase;
import com.hbm.handler.FluidTypeHandler.FluidType;
import com.hbm.interfaces.IFluidAcceptor;
@ -23,7 +22,7 @@ public class TileEntityRBMKOutlet extends TileEntity implements IFluidSource {
public FluidTank steam;
public TileEntityRBMKOutlet() {
steam = new FluidTank(FluidType.SUPERHOTSTEAM, 128000, 0);
steam = new FluidTank(FluidType.SUPERHOTSTEAM, 32000, 0);
}
@Override
@ -51,6 +50,8 @@ public class TileEntityRBMKOutlet extends TileEntity implements IFluidSource {
}
}
}
fillFluidInit(this.steam.getTankType());
}
}

View File

@ -1,6 +1,7 @@
package com.hbm.world.generator.room;
import com.hbm.blocks.ModBlocks;
import com.hbm.crafting.handlers.MKUCraftingHandler;
import com.hbm.items.ModItems;
import com.hbm.tileentity.machine.TileEntitySafe;
import com.hbm.world.generator.CellularDungeon;
@ -8,7 +9,11 @@ import com.hbm.world.generator.CellularDungeonRoom;
import com.hbm.world.generator.DungeonToolbox;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.nbt.NBTTagString;
import net.minecraft.world.World;
public class TestDungeonRoom8 extends CellularDungeonRoom {
@ -45,20 +50,126 @@ public class TestDungeonRoom8 extends CellularDungeonRoom {
world.setBlock(x + parent.width / 2, y + 2, z + parent.width / 2, ModBlocks.safe, 0, 3);
if(world.getTileEntity(x + parent.width / 2, y + 2, z + parent.width / 2) instanceof TileEntitySafe) {
if(world.rand.nextInt(10) == 0)
int r = world.rand.nextInt(10);
if(r == 0)
((TileEntitySafe)world.getTileEntity(x + parent.width / 2, y + 2, z + parent.width / 2)).setInventorySlotContents(7, new ItemStack(ModItems.book_of_));
else if(r < 4)
((TileEntitySafe)world.getTileEntity(x + parent.width / 2, y + 2, z + parent.width / 2)).setInventorySlotContents(7, genetateMKU(world));
else
((TileEntitySafe)world.getTileEntity(x + parent.width / 2, y + 2, z + parent.width / 2)).setInventorySlotContents(7, new ItemStack(Items.book));
}
break;
}
}
public static ItemStack genetateMKU(World world) {
/*world.setBlock(x + parent.width / 2, y, z + parent.width / 2, Blocks.mob_spawner, 0, 2);
TileEntityMobSpawner tileentitymobspawner2 = (TileEntityMobSpawner)world.getTileEntity(x + parent.width / 2, y, z + parent.width / 2);
ItemStack book = new ItemStack(Items.written_book);
book.stackTagCompound = new NBTTagCompound();
book.stackTagCompound.setString("author", "Dave");
book.stackTagCompound.setString("title", "Note");
NBTTagList nbt = new NBTTagList();
String[] pages = generatePages(world);
if (tileentitymobspawner2 != null)
{
tileentitymobspawner2.func_145881_a().setEntityName("entity_cyber_crab");
}*/
for(String s : pages) {
nbt.appendTag(new NBTTagString(s));
}
book.stackTagCompound.setTag("pages", nbt);
return book;
}
private static String[] bookIodine = new String[] {
"alright you will not believe this, but old man weathervane finally managed to show up again since he left two weeks ago",
"and what's more surprising is the fact that he actually decided to spill the beans on what they were doing in the canyon:",
"apparently the morons form R&D discovered a compound that is mostly inorganic, pretty much like a toxin in nature, but get",
"this: the dying cells will reproduce said toxin and excete it through the skin, creating an aerosol that is highly contageous.",
"it's just like a virus, but not a virus. the composition is weird, you can mix it in any household bottle but you do have to",
"get the order right. the doc told me that the first ingredient which is just powdered iodine crystals goes into slot #"
};
private static String[] bookPhosphorous = new String[] {
"heyo, it's me again. i assume you got my last memo, the doc wasn't too happy about it. i'll have to do this quick, the",
"dunderheads from R&D are currently moaning again, probably over money. again. anyway, doc weathervane found that the second",
"ingredient is red phosphorous, whihc has to be mixed into slot #"
};
private static String[] bookDust = new String[] {
"the doc was furious when he found out that the R&D dorks kept the one remaining sample, ranting about gross negligence this",
"and a doomsday scenario that. i told him to chill for a minute, getting all worked up isn't good for his blood pressure, not",
"that he has much blood left to begin with. one of the R&D morons slipped some more info into last week's circular, they call their",
"little concoction \"MKU\" whatever that means, and that it contains actual household lint. can you believe that? one of the most",
"dangerous inventions of theirs and it contains dust. strangely they also mentioned that it goes into slot #"
};
private static String[] bookMercury = new String[] {
"well that settles that. not counting the vomitting blood part, the toxicological report mostly resembles that of mercury",
"poisoning. why? because our little mix also contains mercury! i just wonder where all that stuff comes from when being",
"replicated by the body? whatever, the mercury goes into slot #"
};
private static String[] bookFlower = new String[] {
"remember when i mentioned in my first memo that the compound is mostly anorganic? well guess what, the old man shared the fourth",
"ingredient: ipomoea nil, a genus of flower. morning glory! it might be due to its low sulfur content, whatever might be the case,",
"it does not work with other flowers. the morning glory goes into slot #"
};
private static String[] bookSyringe = new String[] {
"a little addendum to my fifth message, obviously you have to store this MKU stuff in a container. the R&D nuts used regular",
"metal syringes that they got from medical. surplus ware i presume, they got thousands of needles just lying around. the metal",
"syringe goes into slot #"
};
public static String[] generatePages(World world) {
String[] orig;
Item ingred;
int r = world.rand.nextInt(6);
if(r == 0) {
orig = bookIodine;
ingred = ModItems.powder_iodine;
} else if(r == 1) {
orig = bookPhosphorous;
ingred = ModItems.powder_fire;
} else if(r == 2) {
orig = bookDust;
ingred = ModItems.dust;
} else if(r == 3) {
orig = bookMercury;
ingred = ModItems.nugget_mercury;
} else if(r == 4) {
orig = bookFlower;
ingred = ModItems.morning_glory;
} else {
orig = bookSyringe;
ingred = ModItems.syringe_metal_empty;
}
String[] copy = new String[orig.length];
for(int i = 0; i < orig.length; i++) {
copy[i] = orig[i] + ""; //Strings are reference types and i'm really not counting on my luck here
}
copy[copy.length - 1] += getSlot(world, ingred);
return copy;
}
public static int getSlot(World world, Item item) {
MKUCraftingHandler.generateRecipe(world);
ItemStack[] recipe = MKUCraftingHandler.MKURecipe;
if(recipe == null) //take no chances
return -2;
for(int i = 0; i < 9; i++) {
if(recipe[i] != null && recipe[i].getItem() == item) {
return i + 1;
}
}
return -1;
}
}

View File

@ -172,9 +172,9 @@ chem.XENON=Lindeverfahren (Xenon)
chem.XENON_OXY=Verbessertes Lindeverfahren (Xenon)
chem.YELLOWCAKE=Yellowcakeproduktion
container.amsBase=AMS-Basis [WIP]
container.amsEmitter=AMS-Emitter [WIP]
container.amsLimiter=AMS-Stabilisator [WIP]
container.amsBase=AMS-Basis (Deko)
container.amsEmitter=AMS-Emitter (Deko)
container.amsLimiter=AMS-Stabilisator (Deko)
container.anvil=Stufe %s Amboss
container.arcFurnace=Lichtbogenofen
container.armorTable=Rüstungsmodifikationstisch
@ -2561,9 +2561,9 @@ tile.absorber_green.name=Fortgeschrittener Strahlungs-Absorber
tile.absorber_pink.name=Elite Strahlungs-Absorber
tile.absorber_red.name=Verbesserter Strahlungs-Absorber
tile.acid_block.name=Säure
tile.ams_base.name=AMS-Basis [WIP]
tile.ams_emitter.name=AMS-Emitter [WIP]
tile.ams_limiter.name=AMS-Stabilisator [WIP]
tile.ams_base.name=AMS-Basis (Deko)
tile.ams_emitter.name=AMS-Emitter (Deko)
tile.ams_limiter.name=AMS-Stabilisator (Deko)
tile.ancient_scrap.name=Antikes Altmetall
tile.anvil_bismuth.name=Bismutamboss
tile.anvil_dnt.name=Dineutroniumamboss
@ -2756,6 +2756,8 @@ tile.deco_aluminium.name=Aluminium-Dekoblock
tile.deco_asbestos.name=Asbestdach
tile.deco_beryllium.name=Beryllium-Dekoblock
tile.deco_lead.name=Blei-Dekoblock
tile.deco_rbmk.name=RBMK-Dekoblock
tile.deco_rbmk_smooth.name=Glatter RBMK-Dekoblock
tile.deco_red_copper.name=Roter Kupfer-Dekoblock
tile.deco_pipe.name=Stahlrohr
tile.deco_pipe_rusted.name=Rostiges Stahlrohr

View File

@ -240,9 +240,9 @@ chem.XENON=Linde Xenon Cycle
chem.XENON_OXY=Boosted Linde Xenon Cycle
chem.YELLOWCAKE=Yellowcake Production
container.amsBase=AMS Base [WIP]
container.amsEmitter=AMS Emitter [WIP]
container.amsLimiter=AMS Stabilizer [WIP]
container.amsBase=AMS Base (Deco)
container.amsEmitter=AMS Emitter (Deco)
container.amsLimiter=AMS Stabilizer (Deco)
container.anvil=Tier %s Anvil
container.arcFurnace=Arc Furnace
container.armorTable=Armor Modification Table
@ -2627,9 +2627,9 @@ tile.absorber_green.name=Advanced Radiation Absorber
tile.absorber_pink.name=Elite Radiation Absorber
tile.absorber_red.name=Enhanced Radiation Absorber
tile.acid_block.name=Acid
tile.ams_base.name=AMS Base [WIP]
tile.ams_emitter.name=AMS Emitter [WIP]
tile.ams_limiter.name=AMS Stabilizer [WIP]
tile.ams_base.name=AMS Base (Deco)
tile.ams_emitter.name=AMS Emitter (Deco)
tile.ams_limiter.name=AMS Stabilizer (Deco)
tile.ancient_scrap.name=Ancient Scrap Metal
tile.anvil_bismuth.name=Bismuth Anvil
tile.anvil_dnt.name=Dineutronium Anvil
@ -2838,6 +2838,8 @@ tile.deco_aluminium.name=Aluminium Deco Block
tile.deco_asbestos.name=Asbestos Roof
tile.deco_beryllium.name=Beryllium Deco Block
tile.deco_lead.name=Lead Deco Block
tile.deco_rbmk.name=RBMK Deco Block
tile.deco_rbmk_smooth.name=Smooth RBMK Deco Block
tile.deco_red_copper.name=Red Copper Deco Block
tile.deco_pipe.name=Steel Pipe
tile.deco_pipe_rusted.name=Rusty Steel Pipe