it's the bolter

This commit is contained in:
Bob 2020-12-14 23:53:19 +01:00
parent c8aaef9873
commit 149a6231f5
34 changed files with 5980 additions and 2465 deletions

View File

@ -1247,6 +1247,8 @@ item.mike_core.name=Mit Uran ummantelter Deuteriumtank
item.mike_deut.name=Deuteriumtank
item.mike_kit.name=Ivy Mike Kit
item.mirror_tool.name=Spiegeleinstellungswerkzeug
item.mirror_tool.linked=Position eingestellt!
item.mirror_tool.desc=Rechtsclick merkt die Boilerposition.$Clicke auf Spiegel, um sie zum Boiler auszurichten.
item.missile_anti_ballistic.name=Flugabwehrrakete
item.missile_assembly.name=Kleines Raketen-Bauset
item.missile_bhole.name=Schwarzes-Loch-Rakete
@ -2334,6 +2336,7 @@ tile.machine_schrabidium_transmutator.name=Schrabidium-Transmutationsgerät
tile.machine_selenium.name=Hochleistungs-Sternmotor
tile.machine_shredder.name=Brecher
tile.machine_siren.name=Sirene
tile.machine_solar_boiler.name=Solarturmboiler
tile.machine_spp_bottom.name=NPE-Potentialgenerator (Unterteil)
tile.machine_spp_top.name=NPE-Potentialgenerator (Oberteil)
tile.machine_telelinker.name=Geschütz-Telemetrie-Manager
@ -2487,6 +2490,7 @@ tile.sellafield_3.name=Flammendes Sellafit
tile.sellafield_4.name=Infernales Sellafit
tile.sellafield_core.name=Sellafit-Corium
tile.sellafield_slaked.name=Gelöschtes Sellafit
tile.solar_mirror.name=Heliostatspiegel
tile.soyuz_capsule.name=Landekapsel
tile.soyuz_launcher.name=Soyuz-Startplatform
tile.spikes.name=Stacheln

View File

@ -1247,6 +1247,8 @@ item.mike_core.name=Uranium Coated Deuterium Tank
item.mike_deut.name=Deuterium Tank
item.mike_kit.name=Ivy Mike Kit
item.mirror_tool.name=Mirror Adjustment Tool
item.mirror_tool.linked=Alignment position set!
item.mirror_tool.desc=Right-click boiler to memorize the position.$Click on mirrors to turn them towards the boiler.
item.missile_anti_ballistic.name=Anti Ballistic Missile
item.missile_assembly.name=Small Missile Assembly
item.missile_bhole.name=Black Hole Missile
@ -2246,7 +2248,7 @@ tile.hadron_coil_alloy.name=Dense Superconducting Coil
tile.hadron_coil_mese.name=Dense Mese Coil
tile.hadron_coil_schrabidium.name=Dense Schrabidic Coil
tile.hadron_coil_starmetal.name=Dense Starmetal Coil
tile.hadron_core.name=Particle Accelerator Core Commponent
tile.hadron_core.name=Particle Accelerator Core Component
tile.hadron_diode.name=Schottky Particle Diode
tile.hadron_plating.name=Particle Accelerator Plating
tile.hadron_plating_black.name=Particle Accelerator Plating (Black)
@ -2255,7 +2257,7 @@ tile.hadron_plating_glass.name=Particle Accelerator Plating (Window)
tile.hadron_plating_striped.name=Particle Accelerator Plating (Cool Hazard Stripes)
tile.hadron_plating_voltz.name=Particle Accelerator Plating (VOLTZ)
tile.hadron_plating_yellow.name=Particle Accelerator Plating (YelloDye)
tile.hadron_power.name=Particle Accelerator Power Plug
tile.hadron_power.name=Particle Accelerator Power Plugtankish wanted
tile.hazmat.name=Hazmat Cloth Block
tile.iter.name=Fusion Reactor
tile.launch_pad.name=Missile Launch Pad
@ -2334,6 +2336,7 @@ tile.machine_schrabidium_transmutator.name=Schrabidium Transmutation Device
tile.machine_selenium.name=Radial Performance Engine
tile.machine_shredder.name=Shredder
tile.machine_siren.name=Siren
tile.machine_solar_boiler.name=Solar Tower Boiler
tile.machine_spp_bottom.name=ZPE Potential Generator (Bottom)
tile.machine_spp_top.name=ZPE Potential Generator (Top)
tile.machine_telelinker.name=Turret Telemetry Linker
@ -2487,6 +2490,7 @@ tile.sellafield_3.name=Blazing Sellafite
tile.sellafield_4.name=Infernal Sellafite
tile.sellafield_core.name=Sellafite-Corium
tile.sellafield_slaked.name=Slaked Sellafite
tile.solar_mirror.name=Heliostat Mirror
tile.soyuz_capsule.name=Cargo Landing Capsule
tile.soyuz_launcher.name=Soyuz Launch Platform
tile.spikes.name=Spikes

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 596 B

After

Width:  |  Height:  |  Size: 913 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -22,6 +22,15 @@ public class WorldConfig {
public static int lithiumSpawn = 6;
public static int oilcoalSpawn = 128;
public static int netherUraniumuSpawn = 8;
public static int netherTungstenSpawn = 10;
public static int netherSulfurSpawn = 26;
public static int netherPhosphorusSpawn = 24;
public static int netherCoalSpawn = 24;
public static int netherPlutoniumSpawn = 8;
public static int endTikiteSpawn = 8;
public static int radioStructure = 500;
public static int antennaStructure = 250;
public static int atomStructure = 500;
@ -71,6 +80,15 @@ public class WorldConfig {
rareSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.14_rareEarthSpawnRate", "Amount of rare earth ore veins per chunk", 6);
oilcoalSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.15_oilCoalSpawnRate", "Spawns an oily coal vein every nTH chunk", 128);
netherUraniumuSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.N00_uraniumSpawnrate", "Amount of nether uranium per chunk", 8);
netherTungstenSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.N01_tungstenSpawnrate", "Amount of nether tungsten per chunk", 10);
netherSulfurSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.N02_sulfurSpawnrate", "Amount of nether sulfur per chunk", 26);
netherPhosphorusSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.N03_phosphorusSpawnrate", "Amount of nether phosphorus per chunk", 24);
netherCoalSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.N04_coalSpawnrate", "Amount of nether coal per chunk", 24);
netherPlutoniumSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.N05_plutoniumSpawnrate", "Amount of nether plutonium per chunk, if enabled", 8);
endTikiteSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.E00_tikiteSpawnrate", "Amount of end trixite per chunk", 8);
final String CATEGORY_DUNGEON = "04_dungeons";
radioStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.00_radioSpawn", "Spawn radio station on every nTH chunk", 500);
antennaStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.01_antennaSpawn", "Spawn antenna on every nTH chunk", 250);

View File

@ -148,6 +148,8 @@ public class BulletConfigSyncingUtil {
public static int R556_FLECHETTE_DU = i++;
public static int R556_FLECHETTE_SLEEK = i++;
public static int R556_K = i++;
public static int B75_NORMAL = i++;
public static int G20_NORMAL_FIRE = i++;
public static int G20_SHRAPNEL_FIRE = i++;
@ -333,6 +335,8 @@ public class BulletConfigSyncingUtil {
configSet.put(R556_FLECHETTE_DU, Gun556mmFactory.get556FlechetteDUConfig());
configSet.put(R556_FLECHETTE_SLEEK, Gun556mmFactory.get556FlechetteSleekConfig());
configSet.put(R556_K, Gun556mmFactory.get556KConfig());
configSet.put(B75_NORMAL, Gun75BoltFactory.get75BoltConfig());
configSet.put(G20_NORMAL_FIRE, Gun20GaugeFactory.get20GaugeConfig().setToFire(3));
configSet.put(G20_SHRAPNEL_FIRE, Gun20GaugeFactory.get20GaugeShrapnelConfig().setToFire(3));

View File

@ -53,6 +53,8 @@ public class GunConfiguration {
public int reloadType;
//whether or not the infinity enchantment should work
public boolean allowsInfinity;
//whether the ammo count should be displayed
public boolean showAmmo = true;
public String name = "";
public String manufacturer = "";

View File

@ -39,7 +39,7 @@ public class Gun556mmFactory {
config.ammoCap = 40;
config.reloadType = GunConfiguration.RELOAD_FULL;
config.allowsInfinity = true;
config.crosshair = Crosshair.L_BOX;
config.crosshair = Crosshair.L_CROSS;
config.durability = 10000;
config.reloadSound = GunConfiguration.RSOUND_MAG;
config.firingSound = "hbm:weapon.hksShoot";

View File

@ -0,0 +1,85 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.items.ModItems;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
public class Gun75BoltFactory {
public static GunConfiguration getBolterConfig() {
GunConfiguration config = new GunConfiguration();
config.rateOfFire = 2;
config.roundsPerCycle = 1;
config.gunMode = GunConfiguration.MODE_NORMAL;
config.firingMode = GunConfiguration.FIRE_AUTO;
config.hasSights = false;
config.reloadDuration = 40;
config.firingDuration = 0;
config.ammoCap = 30;
config.reloadType = GunConfiguration.RELOAD_FULL;
config.allowsInfinity = true;
config.crosshair = Crosshair.NONE;
config.durability = 10000;
config.reloadSound = GunConfiguration.RSOUND_MAG;
config.firingSound = "hbm:weapon.hksShoot";
config.reloadSoundEnd = false;
config.showAmmo = false;
config.animations.put(AnimType.CYCLE, new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 25))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 75))
)
.addBus("EJECT", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 25))
.addKeyframe(new BusAnimationKeyframe(0, 0, 1, 75))
)
);
config.animations.put(AnimType.RELOAD, new BusAnimation()
.addBus("TILT", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 250))
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 1500))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 250))
)
.addBus("MAG", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(0, 0, 1, 500))
.addKeyframe(new BusAnimationKeyframe(1, 0, 1, 500))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 500))
)
);
config.name = "Manticora Pattern Boltgun";
config.manufacturer = "Cerix Magnus";
config.config = new ArrayList();
config.config.add(BulletConfigSyncingUtil.B75_NORMAL);
return config;
}
static float inaccuracy = 0.5F;
public static BulletConfiguration get75BoltConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_75bolt;
bullet.ammoCount = 30;
bullet.spread *= inaccuracy;
bullet.dmgMin = 5;
bullet.dmgMax = 10;
return bullet;
}
}

View File

@ -1199,6 +1199,7 @@ public class ModItems {
public static Item ammo_50bmg_star;
public static Item ammo_50bmg_chlorophyte;
public static Item ammo_50bmg_sleek;
public static Item ammo_75bolt;
public static Item ammo_folly;
public static Item ammo_folly_nuclear;
public static Item ammo_folly_du;
@ -1317,6 +1318,7 @@ public class ModItems {
public static Item gun_cryolator;
public static Item gun_cryolator_ammo;
public static Item gun_mp;
public static Item gun_bolter;
public static Item gun_brimstone;
public static Item gun_zomg;
public static Item gun_super_shotgun;
@ -3082,6 +3084,7 @@ public class ModItems {
ammo_50bmg_star = new ItemAmmo().setUnlocalizedName("ammo_50bmg_star").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_star");
ammo_50bmg_chlorophyte = new ItemAmmo().setUnlocalizedName("ammo_50bmg_chlorophyte").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_chlorophyte");
ammo_50bmg_sleek = new ItemAmmo().setUnlocalizedName("ammo_50bmg_sleek").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_sleek");
ammo_75bolt = new ItemAmmo().setUnlocalizedName("ammo_75bolt").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_75bolt");
ammo_357_desh = new ItemAmmo().setUnlocalizedName("ammo_357_desh").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_357_desh");
ammo_44 = new ItemAmmo().setUnlocalizedName("ammo_44").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44");
ammo_44_ap = new ItemAmmo().setUnlocalizedName("ammo_44_ap").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44_ap");
@ -3215,6 +3218,7 @@ public class ModItems {
gun_cryolator = new GunCryolator().setUnlocalizedName("gun_cryolator").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_cryolator");
ammo_566_gold = new ItemCustomLore().setUnlocalizedName("gun_mp_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_pm_ammo");
gun_mp = new ItemGunBase(Gun556mmFactory.getEuphieConfig()).setUnlocalizedName("gun_mp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_pm");
gun_bolter = new ItemGunBase(Gun75BoltFactory.getBolterConfig()).setUnlocalizedName("gun_bolter").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolter");
gun_brimstone = new GunBrimstone().setUnlocalizedName("gun_brimstone").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_brimstone");
gun_zomg = new ItemGunBase(GunEnergyFactory.getZOMGConfig()).setUnlocalizedName("gun_zomg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_zomg");
gun_revolver_inverted = new GunSuicide().setUnlocalizedName("gun_revolver_inverted").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_inverted");
@ -5356,6 +5360,7 @@ public class ModItems {
GameRegistry.registerItem(gun_flamer, gun_flamer.getUnlocalizedName());
GameRegistry.registerItem(gun_cryolator, gun_cryolator.getUnlocalizedName());
GameRegistry.registerItem(gun_mp, gun_mp.getUnlocalizedName());
GameRegistry.registerItem(gun_bolter, gun_bolter.getUnlocalizedName());
GameRegistry.registerItem(gun_brimstone, gun_brimstone.getUnlocalizedName());
GameRegistry.registerItem(gun_zomg, gun_zomg.getUnlocalizedName());
GameRegistry.registerItem(gun_emp, gun_emp.getUnlocalizedName());
@ -5489,6 +5494,7 @@ public class ModItems {
GameRegistry.registerItem(ammo_50bmg_star, ammo_50bmg_star.getUnlocalizedName());
GameRegistry.registerItem(ammo_50bmg_chlorophyte, ammo_50bmg_chlorophyte.getUnlocalizedName());
GameRegistry.registerItem(ammo_50bmg_sleek, ammo_50bmg_sleek.getUnlocalizedName());
GameRegistry.registerItem(ammo_75bolt, ammo_75bolt.getUnlocalizedName());
GameRegistry.registerItem(ammo_fuel, ammo_fuel.getUnlocalizedName());
GameRegistry.registerItem(ammo_fuel_napalm, ammo_fuel_napalm.getUnlocalizedName());
GameRegistry.registerItem(ammo_fuel_phosphorus, ammo_fuel_phosphorus.getUnlocalizedName());

View File

@ -377,6 +377,10 @@ public class ItemCustomLore extends Item {
{
list.add("It pulses with power.");
}
if(this == ModItems.nugget_mox_fuel) {
list.add("Moxie says: " + EnumChatFormatting.BOLD + "TAX EVASION.");
}
}
@Override

View File

@ -1,10 +1,16 @@
package com.hbm.items.tool;
import java.util.List;
import com.google.common.collect.Multimap;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ModBlocks;
import com.hbm.tileentity.machine.TileEntitySolarMirror;
import com.hbm.util.I18nUtil;
import net.minecraft.block.Block;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@ -12,6 +18,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public class ItemMirrorTool extends Item {
@ -34,7 +41,7 @@ public class ItemMirrorTool extends Item {
stack.stackTagCompound.setInteger("posY", pos[1] + 1);
stack.stackTagCompound.setInteger("posZ", pos[2]);
player.addChatComponentMessage(new ChatComponentTranslation("solar.linked").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
player.addChatComponentMessage(new ChatComponentTranslation(this.getUnlocalizedName() + ".linked").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
}
return true;
@ -44,7 +51,12 @@ public class ItemMirrorTool extends Item {
if(!world.isRemote) {
TileEntitySolarMirror mirror = (TileEntitySolarMirror)world.getTileEntity(x, y, z);
mirror.setTarget(stack.stackTagCompound.getInteger("posX"), stack.stackTagCompound.getInteger("posY"), stack.stackTagCompound.getInteger("posZ"));
int tx = stack.stackTagCompound.getInteger("posX");
int ty = stack.stackTagCompound.getInteger("posY");
int tz = stack.stackTagCompound.getInteger("posZ");
if(Vec3.createVectorHelper(x - tx, y - ty, z - tz).lengthVector() < 25)
mirror.setTarget(tx, ty, tz);
}
return true;
@ -52,4 +64,19 @@ public class ItemMirrorTool extends Item {
return false;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
for(String s : I18nUtil.resolveKeyArray(this.getUnlocalizedName() + ".desc"))
list.add(EnumChatFormatting.YELLOW + s);
}
@Override
public Multimap getAttributeModifiers(ItemStack stack) {
Multimap multimap = super.getAttributeModifiers(stack);
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", 2, 0));
return multimap;
}
}

View File

@ -721,6 +721,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD {
Item ammo = bcfg.ammo;
int count = ItemGunBase.getMag(stack);
int max = gcfg.ammoCap;
boolean showammo = gcfg.showAmmo;
if(gcfg.reloadType == GunConfiguration.RELOAD_NONE) {
ammo = ItemGunBase.getBeltType(player, stack, true);
@ -730,7 +731,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD {
int dura = ItemGunBase.getItemWear(stack) * 50 / gcfg.durability;
RenderScreenOverlay.renderAmmo(event.resolution, Minecraft.getMinecraft().ingameGUI, ammo, count, max, dura);
RenderScreenOverlay.renderAmmo(event.resolution, Minecraft.getMinecraft().ingameGUI, ammo, count, max, dura, showammo);
if(gun.altConfig != null && gun.altConfig.reloadType == GunConfiguration.RELOAD_NONE) {
Item oldAmmo = ammo;

View File

@ -632,14 +632,14 @@ public class HbmWorldGen implements IWorldGenerator {
private void generateNether(World world, Random rand, int i, int j) {
DungeonToolbox.generateOre(world, rand, i, j, 8, 6, 0, 127, ModBlocks.ore_nether_uranium, Blocks.netherrack);
DungeonToolbox.generateOre(world, rand, i, j, 10, 10, 0, 127, ModBlocks.ore_nether_tungsten, Blocks.netherrack);
DungeonToolbox.generateOre(world, rand, i, j, 26, 12, 0, 127, ModBlocks.ore_nether_sulfur, Blocks.netherrack);
DungeonToolbox.generateOre(world, rand, i, j, 24, 6, 0, 127, ModBlocks.ore_nether_fire, Blocks.netherrack);
DungeonToolbox.generateOre(world, rand, i, j, 24, 32, 16, 96, ModBlocks.ore_nether_coal, Blocks.netherrack);
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.netherUraniumuSpawn, 6, 0, 127, ModBlocks.ore_nether_uranium, Blocks.netherrack);
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.netherTungstenSpawn, 10, 0, 127, ModBlocks.ore_nether_tungsten, Blocks.netherrack);
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.netherSulfurSpawn, 12, 0, 127, ModBlocks.ore_nether_sulfur, Blocks.netherrack);
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.netherPhosphorusSpawn, 6, 0, 127, ModBlocks.ore_nether_fire, Blocks.netherrack);
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.netherCoalSpawn, 32, 16, 96, ModBlocks.ore_nether_coal, Blocks.netherrack);
if(GeneralConfig.enablePlutoniumOre)
DungeonToolbox.generateOre(world, rand, i, j, 6, 4, 0, 127, ModBlocks.ore_nether_uranium, Blocks.netherrack);
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.netherPlutoniumSpawn, 4, 0, 127, ModBlocks.ore_nether_uranium, Blocks.netherrack);
for(int k = 0; k < 30; k++){
int x = i + rand.nextInt(16);
@ -663,7 +663,7 @@ public class HbmWorldGen implements IWorldGenerator {
}
private void generateEnd(World world, Random rand, int i, int j) {
DungeonToolbox.generateOre(world, rand, i, j, 8, 6, 0, 127, ModBlocks.ore_tikite, Blocks.end_stone);
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.endTikiteSpawn, 6, 0, 127, ModBlocks.ore_tikite, Blocks.end_stone);
}
}

View File

@ -288,6 +288,7 @@ public class ClientProxy extends ServerProxy {
MinecraftForgeClient.registerItemRenderer(ModItems.gun_sauer, new ItemRenderWeaponSauer());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_vortex, new ItemRenderWeaponVortex());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_thompson, new ItemRenderWeaponThompson());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolter, new ItemRenderWeaponBolter());
//ammo
MinecraftForgeClient.registerItemRenderer(ModItems.gun_fatman_ammo, new ItemRenderMiniNuke());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_mirv_ammo, new ItemRenderMIRV());

View File

@ -530,6 +530,9 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_copper_torus, 2), new Object[] { " C ", "CPC", " C ", 'P', "plateIron", 'C', ModItems.coil_copper }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_advanced_torus, 2), new Object[] { " C ", "CPC", " C ", 'P', "plateIron", 'C', ModItems.coil_advanced_alloy }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_gold_torus, 2), new Object[] { " C ", "CPC", " C ", 'P', "plateIron", 'C', ModItems.coil_gold }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_copper_torus, 2), new Object[] { " C ", "CPC", " C ", 'P', "plateSteel", 'C', ModItems.coil_copper }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_advanced_torus, 2), new Object[] { " C ", "CPC", " C ", 'P', "plateSteel", 'C', ModItems.coil_advanced_alloy }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_gold_torus, 2), new Object[] { " C ", "CPC", " C ", 'P', "plateSteel", 'C', ModItems.coil_gold }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_tungsten, 1), new Object[] { "WWW", "WIW", "WWW", 'W', ModItems.wire_tungsten, 'I', "ingotIron" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_magnetized_tungsten, 1), new Object[] { "WWW", "WIW", "WWW", 'W', ModItems.wire_magnetized_tungsten, 'I', "ingotIron" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.tank_steel, 2), new Object[] { "STS", "S S", "STS", 'S', "plateSteel", 'T', "plateTitanium" }));
@ -627,6 +630,8 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_press, 1), new Object[] { "IRI", "IPI", "IBI", 'I', "ingotIron", 'R', Blocks.furnace, 'B', "blockIron", 'P', Blocks.piston }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_siren, 1), new Object[] { "SIS", "ICI", "SRS", 'S', "plateSteel", 'I', ModItems.plate_polymer, 'C', ModItems.circuit_copper, 'R', "dustRedstone" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_microwave, 1), new Object[] { "III", "SGM", "IDI", 'I', ModItems.plate_polymer, 'S', "plateSteel", 'G', "paneGlass", 'M', ModItems.magnetron, 'D', ModItems.motor }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_solar_boiler), new Object[] { "SHS", "DHD", "SHS", 'S', "ingotSteel", 'H', ModItems.hull_big_steel, 'D', "dyeBlack" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.solar_mirror, 3), new Object[] { "AAA", " B ", "SSS", 'A', "plateAluminum", 'B', ModBlocks.steel_beam, 'S', "ingotSteel" }));
GameRegistry.addRecipe(new ItemStack(ModBlocks.muffler, 1), new Object[] { "III", "IWI", "III", 'I', ModItems.plate_polymer, 'W', Blocks.wool });
@ -750,6 +755,7 @@ public class CraftingManager {
GameRegistry.addShapelessRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_corner)), new Object[] { Item.getItemFromBlock(ModBlocks.steel_wall), Item.getItemFromBlock(ModBlocks.steel_wall) });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_roof), 2), new Object[] { "SSS", 'S', "ingotSteel" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_scaffold), 8), new Object[] { "SSS", " S ", "SSS", 'S', "ingotSteel" }));
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_beam), 8), new Object[] { "S", "S", "S", 'S', ModBlocks.steel_scaffold });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_rpg, 1), new Object[] { "SSW", " MW", 'S', ModItems.hull_small_steel, 'W', "plateIron", 'M', ModItems.mechanism_launcher_1 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_panzerschreck, 1), new Object[] { "SSS", " MW", 'S', ModItems.hull_small_steel, 'W', "plateCopper", 'M', ModItems.mechanism_launcher_1 }));
@ -1378,6 +1384,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_biometry, 1), new Object[] { "CC ", "GGS", "SSS", 'C', ModItems.circuit_copper, 'S', "plateSteel", 'G', "plateGold", 'I', "plateLead" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.survey_scanner, 1), new Object[] { "SWS", " G ", "PCP", 'W', ModItems.wire_gold, 'P', ModItems.ingot_polymer, 'C', ModItems.circuit_gold, 'S', "plateSteel", 'G', "ingotGold" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.geiger_counter, 1), new Object[] { "GPP", "WCS", "WBB", 'W', ModItems.wire_gold, 'P', ModItems.ingot_polymer, 'C', ModItems.circuit_copper, 'G', "ingotGold", 'S', "plateSteel", 'B', ModItems.ingot_beryllium }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.mirror_tool), new Object[] { " A ", " IA", "I ", 'A', "ingotAluminum", 'I', "ingotIron" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.key, 1), new Object[] { " B", " B ", "P ", 'P', "plateSteel", 'B', ModItems.bolt_tungsten }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.key_kit, 1), new Object[] { "PKP", "DTD", "PKP", 'P', "plateGold", 'K', ModItems.key, 'D', "dustDiamond", 'T', ModItems.screwdriver }));
@ -1639,8 +1646,8 @@ public class CraftingManager {
GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.waste_trinitite), new Object[] { new ItemStack(Blocks.sand, 1, 0), ModItems.trinitite });
GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.waste_trinitite_red), new Object[] { new ItemStack(Blocks.sand, 1, 1), ModItems.trinitite });
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.sand_uranium), new Object[] { "sand", "dustUranium" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.sand_polonium), new Object[] { "sand", "dustPolonium" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.sand_uranium), new Object[] { "sand", "sand", "sand", "sand", "sand", "sand", "sand", "sand", "dustUranium" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.sand_polonium), new Object[] { "sand", "sand", "sand", "sand", "sand", "sand", "sand", "sand", "dustPolonium" }));
GameRegistry.addRecipe(new ItemStack(ModItems.rune_blank, 1), new Object[] { "PSP", "SDS", "PSP", 'P', ModItems.powder_magic, 'S', ModItems.ingot_starmetal, 'D', ModItems.dynosphere_dineutronium_charged });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rune_isa, 1), new Object[] { ModItems.rune_blank, ModItems.powder_spark_mix, ModItems.singularity_counter_resonant });

View File

@ -4,7 +4,9 @@ import java.lang.reflect.Field;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.apache.commons.lang3.math.NumberUtils;
@ -26,6 +28,7 @@ import com.hbm.handler.RadiationWorldHandler;
import com.hbm.handler.HTTPHandler;
import com.hbm.items.ModItems;
import com.hbm.items.armor.ArmorFSB;
import com.hbm.items.weapon.ItemGunBase;
import com.hbm.lib.Library;
import com.hbm.lib.ModDamageSource;
import com.hbm.lib.RefStrings;
@ -36,6 +39,7 @@ import com.hbm.saveddata.AuxSavedData;
import com.hbm.saveddata.RadiationSavedData;
import com.hbm.util.ArmorUtil;
import com.hbm.util.ContaminationUtil;
import com.hbm.util.EnchantmentUtil;
import com.hbm.world.generator.TimedGenerator;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@ -44,6 +48,8 @@ import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
import cpw.mods.fml.common.gameevent.TickEvent.WorldTickEvent;
import cpw.mods.fml.relauncher.ReflectionHelper;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.EntityCreeper;
@ -55,6 +61,7 @@ import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
@ -67,6 +74,7 @@ import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
import net.minecraftforge.event.AnvilUpdateEvent;
import net.minecraftforge.event.ServerChatEvent;
import net.minecraftforge.event.entity.EntityEvent.EnteringChunk;
import net.minecraftforge.event.entity.living.LivingAttackEvent;
@ -725,4 +733,28 @@ public class ModEventHandler
event.setCanceled(true);
}
}
@SubscribeEvent
public void anvilUpdateEvent(AnvilUpdateEvent event) {
if(event.left.getItem() instanceof ItemGunBase && event.right.getItem() == Items.enchanted_book) {
event.output = event.left.copy();
Map mapright = EnchantmentHelper.getEnchantments(event.right);
Iterator itr = mapright.keySet().iterator();
while (itr.hasNext()) {
int i = ((Integer)itr.next()).intValue();
int j = ((Integer)mapright.get(Integer.valueOf(i))).intValue();
Enchantment e = Enchantment.enchantmentsList[i];
EnchantmentUtil.removeEnchantment(event.output, e);
EnchantmentUtil.addEnchantment(event.output, e, j);
}
event.cost = 10;
}
}
}

View File

@ -46,6 +46,7 @@ import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@ -58,6 +59,7 @@ import net.minecraft.util.Vec3;
import net.minecraftforge.client.event.MouseEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
import net.minecraftforge.client.event.RenderItemInFrameEvent;
import net.minecraftforge.client.event.RenderLivingEvent;
import net.minecraftforge.client.event.RenderPlayerEvent;
import net.minecraftforge.client.event.RenderWorldLastEvent;
@ -381,4 +383,28 @@ public class ModEventHandlerClient {
if(event.map.getTextureType() == 0)
particleBase = event.map.registerIcon(RefStrings.MODID + ":particle/particle_base");
}
private static final ResourceLocation poster = new ResourceLocation(RefStrings.MODID + ":textures/models/misc/poster.png");
@SubscribeEvent
public void renderFrame(RenderItemInFrameEvent event) {
if(event.item != null && event.item.getItem() == ModItems.flame_pony) {
event.setCanceled(true);
double p = 0.0625D;
double o = p * 2.75D;
GL11.glDisable(GL11.GL_LIGHTING);
Minecraft.getMinecraft().renderEngine.bindTexture(poster);
Tessellator tess = Tessellator.instance;
tess.startDrawingQuads();
tess.addVertexWithUV(0.5, 0.5 + o, p * 0.5, 1, 0);
tess.addVertexWithUV(-0.5, 0.5 + o, p * 0.5, 0, 0);
tess.addVertexWithUV(-0.5, -0.5 + o, p * 0.5, 0, 1);
tess.addVertexWithUV(0.5, -0.5 + o, p * 0.5, 1, 1);
tess.draw();
GL11.glEnable(GL11.GL_LIGHTING);
}
}
}

View File

@ -492,6 +492,7 @@ public class ResourceManager {
public static final IModelCustom sauergun = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/sauergun.obj"));
public static final IModelCustom vortex = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/vortex.obj"));
public static final IModelCustom thompson = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/thompson.obj"));
public static final IModelCustom bolter = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/bolter.obj"));
public static final IModelCustom grenade_frag = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/grenade_frag.obj"));
public static final IModelCustom grenade_aschrab = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/grenade_aschrab.obj"));
@ -533,6 +534,7 @@ public class ResourceManager {
public static final ResourceLocation sauergun_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/sauergun.png");
public static final ResourceLocation vortex_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/vortex.png");
public static final ResourceLocation thompson_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/thompson.png");
public static final ResourceLocation bolter_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/bolter.png");
public static final ResourceLocation grenade_mk2 = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/grenade_mk2.png");
public static final ResourceLocation grenade_aschrab_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/grenade_aschrab.png");

View File

@ -0,0 +1,150 @@
package com.hbm.render.item.weapon;
import org.lwjgl.opengl.GL11;
import com.hbm.items.weapon.ItemGunBase;
import com.hbm.main.ResourceManager;
import com.hbm.render.anim.HbmAnimations;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ItemRenderWeaponBolter implements IItemRenderer {
public ItemRenderWeaponBolter() { }
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch(type) {
case EQUIPPED:
case EQUIPPED_FIRST_PERSON:
case ENTITY:
case INVENTORY:
return true;
default: return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bolter_tex);
switch(type) {
case EQUIPPED_FIRST_PERSON:
double s0 = 0.25D;
GL11.glRotated(25, 0, 0, 1);
GL11.glTranslated(1.25, -0.25, -0.25);
GL11.glRotated(-100, 0, 1, 0);
GL11.glScaled(s0, s0, s0);
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
GL11.glRotated(recoil[0] * 5, 1, 0, 0);
GL11.glTranslated(0, 0, recoil[0]);
double[] tilt = HbmAnimations.getRelevantTransformation("TILT");
GL11.glTranslated(0, tilt[0], 3);
GL11.glRotated(tilt[0] * 35, 1, 0, 0);
GL11.glTranslated(0, 0, -3);
ResourceManager.bolter.renderPart("Body");
double[] mag = HbmAnimations.getRelevantTransformation("MAG");
GL11.glPushMatrix();
GL11.glTranslated(0, 0, 5);
GL11.glRotated(mag[0] * 60 * (mag[2] == 1 ? 2.5 : 1), -1, 0, 0);
GL11.glTranslated(0, 0, -5);
ResourceManager.bolter.renderPart("Mag");
if(mag[2] != 1)
ResourceManager.bolter.renderPart("Bullet");
GL11.glPopMatrix();
GL11.glPushMatrix();
double[] casing = HbmAnimations.getRelevantTransformation("EJECT");
GL11.glTranslated(casing[2] * 5, casing[2] * 2, 0);
GL11.glRotated(casing[2] * 60, 1, 0, 0);
ResourceManager.bolter.renderPart("Casing");
GL11.glPopMatrix();
break;
case EQUIPPED:
double scale = 0.25D;
GL11.glScaled(scale, scale, scale);
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(-170, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-15F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(-2F, -0.9F, -0.75F);
break;
case ENTITY:
double s1 = 0.2D;
GL11.glScaled(s1, s1, s1);
GL11.glTranslated(0, 1, 0);
break;
case INVENTORY:
GL11.glEnable(GL11.GL_LIGHTING);
double s = 2.5D;
GL11.glTranslated(6, 10, 0);
GL11.glRotated(90, 0, 1, 0);
GL11.glRotated(135, 1, 0, 0);
GL11.glScaled(s, s, -s);
break;
default: break;
}
if(type != ItemRenderType.EQUIPPED_FIRST_PERSON) {
ResourceManager.bolter.renderAll();
}
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPushMatrix();
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
String s = ((ItemGunBase)item.getItem()).getMag(item) + "";
float f3 = 0.04F;
GL11.glTranslatef(-0.025F - (font.getStringWidth(s) / 2) * 0.04F, 2.15F, 2.95F);
GL11.glScalef(f3, -f3, f3);
GL11.glRotatef(45, 1, 0, 0);
GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
font.drawString(s, 0, 0, 0xff0000);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopAttrib();
RenderHelper.enableGUIStandardItemLighting();
GL11.glPopMatrix();
GL11.glPopMatrix();
}
}

View File

@ -8,6 +8,7 @@ import com.hbm.tileentity.machine.TileEntitySolarMirror;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.EnumSkyBlock;
public class RenderSolarMirror extends TileEntitySpecialRenderer {
@ -43,7 +44,7 @@ public class RenderSolarMirror extends TileEntitySpecialRenderer {
GL11.glTranslated(0, -1, 0);
ResourceManager.solar_mirror.renderPart("Mirror");
if(mirror.tY >= mirror.yCoord && te.getWorldObj().canBlockSeeTheSky(te.xCoord, te.yCoord + 1, te.zCoord)) {
if(mirror.isOn) {
Tessellator tess = Tessellator.instance;
GL11.glDisable(GL11.GL_TEXTURE_2D);
@ -56,7 +57,7 @@ public class RenderSolarMirror extends TileEntitySpecialRenderer {
GL11.glDepthMask(false);
float min = 0.005F;
float max = 0.02F;
float max = 0.01F;
tess.startDrawingQuads();
tess.setColorRGBA_F(1F, 1F, 1F, max);

View File

@ -108,7 +108,7 @@ public class RenderScreenOverlay {
Minecraft.getMinecraft().renderEngine.bindTexture(Gui.icons);
}
public static void renderAmmo(ScaledResolution resolution, Gui gui, Item ammo, int count, int max, int dura) {
public static void renderAmmo(ScaledResolution resolution, Gui gui, Item ammo, int count, int max, int dura, boolean renderCount) {
GL11.glPushMatrix();
@ -123,7 +123,8 @@ public class RenderScreenOverlay {
String cap = max == -1 ? ("") : ("" + max);
Minecraft.getMinecraft().fontRenderer.drawString(count + " / " + cap, pX + 16, pZ + 6, 0xFFFFFF);
if(renderCount)
Minecraft.getMinecraft().fontRenderer.drawString(count + " / " + cap, pX + 16, pZ + 6, 0xFFFFFF);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);

View File

@ -32,9 +32,9 @@ public class TileEntitySolarBoiler extends TileEntity implements IFluidAcceptor,
if(!worldObj.isRemote) {
if(worldObj.getTotalWorldTime() % 10 == 0) {
//if(worldObj.getTotalWorldTime() % 5 == 0) {
fillFluidInit(FluidType.STEAM);
}
//}
int process = heat / 10;
process = Math.min(process, water.getFill());
@ -46,8 +46,8 @@ public class TileEntitySolarBoiler extends TileEntity implements IFluidAcceptor,
water.setFill(water.getFill() - process);
steam.setFill(steam.getFill() + process * 100);
if(steam.getFill() > steam.getMaxFill() * 0.9)
System.out.println("*" + steam.getFill());
//if(steam.getFill() > steam.getMaxFill() * 0.9)
// System.out.println("*" + steam.getFill());
heat = 0;
}
@ -105,7 +105,7 @@ public class TileEntitySolarBoiler extends TileEntity implements IFluidAcceptor,
@Override
public boolean getTact() {
return worldObj.getTotalWorldTime() % 20 < 10;
return worldObj.getTotalWorldTime() % 2 == 0;
}
@Override

View File

@ -2,8 +2,11 @@ package com.hbm.tileentity.machine;
import com.hbm.tileentity.TileEntityTickingBase;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.EnumSkyBlock;
public class TileEntitySolarMirror extends TileEntityTickingBase {
@ -11,6 +14,7 @@ public class TileEntitySolarMirror extends TileEntityTickingBase {
public int tX;
public int tY;
public int tZ;
public boolean isOn;
@Override
public String getInventoryName() {
@ -25,13 +29,19 @@ public class TileEntitySolarMirror extends TileEntityTickingBase {
if(worldObj.getTotalWorldTime() % 20 == 0)
sendUpdate();
if(tY < yCoord)
if(tY < yCoord) {
isOn = false;
return;
}
int sun = worldObj.getSavedLightValue(EnumSkyBlock.Sky, xCoord, yCoord, zCoord) - worldObj.skylightSubtracted - 11;
if(sun <= 0 || !worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord))
if(sun <= 0 || !worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord)) {
isOn = false;
return;
}
isOn = true;
TileEntity te = worldObj.getTileEntity(tX, tY - 1, tZ);
@ -48,6 +58,7 @@ public class TileEntitySolarMirror extends TileEntityTickingBase {
data.setInteger("posX", tX);
data.setInteger("posY", tY);
data.setInteger("posZ", tZ);
data.setBoolean("isOn", isOn);
this.networkPack(data, 200);
}
@ -56,6 +67,7 @@ public class TileEntitySolarMirror extends TileEntityTickingBase {
tX = nbt.getInteger("posX");
tY = nbt.getInteger("posY");
tZ = nbt.getInteger("posZ");
isOn = nbt.getBoolean("isOn");
}
public void setTarget(int x, int y, int z) {
@ -79,4 +91,29 @@ public class TileEntitySolarMirror extends TileEntityTickingBase {
nbt.setInteger("targetY", tY);
nbt.setInteger("targetZ", tZ);
}
AxisAlignedBB bb = null;
@Override
public AxisAlignedBB getRenderBoundingBox() {
if(bb == null) {
bb = AxisAlignedBB.getBoundingBox(
xCoord - 0.25,
yCoord,
zCoord - 0.25,
xCoord + 1.25,
yCoord + 1.5,
zCoord + 1.25
);
}
return bb;
}
@Override
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared() {
return 65536.0D;
}
}

View File

@ -12,13 +12,17 @@ public class EnchantmentUtil {
public static void removeEnchantment(ItemStack stack, Enchantment enchantment) {
if(stack.getEnchantmentTagList() == null)
return;
int i = 0;
for( ; i < stack.getEnchantmentTagList().tagCount(); i++) {
if(stack.getEnchantmentTagList().getCompoundTagAt(i).getShort("id") == enchantment.effectId)
break;
}
stack.getEnchantmentTagList().removeTag(i);
if(i < stack.getEnchantmentTagList().tagCount())
stack.getEnchantmentTagList().removeTag(i);
if(stack.getEnchantmentTagList().tagCount() == 0)
stack.getTagCompound().removeTag("ench");