mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
legalize nuclear bombs
This commit is contained in:
parent
049bc8c31b
commit
062fe4205f
@ -12,6 +12,7 @@ import static com.hbm.items.weapon.sedna.factory.XFactory762mm.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory9mm.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactoryAccelerator.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactoryBlackPowder.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactoryCatapult.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactoryEnergy.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactoryRocket.*;
|
||||
|
||||
@ -135,6 +136,8 @@ public class GunFactoryClient {
|
||||
setRendererBulk(LegoClient.RENDER_RPZB, rocket_rpzb);
|
||||
setRendererBulk(LegoClient.RENDER_QD, rocket_qd);
|
||||
setRendererBulk(LegoClient.RENDER_ML, rocket_ml);
|
||||
|
||||
setRendererBulk(LegoClient.RENDER_NUKE, nuke_standard, nuke_demo, nuke_high);
|
||||
|
||||
setRendererBulkBeam(LegoClient.RENDER_LIGHTNING, energy_tesla, energy_tesla_overcharge);
|
||||
setRendererBulkBeam(LegoClient.RENDER_TAU, tau_uranium);
|
||||
@ -171,6 +174,7 @@ public class GunFactoryClient {
|
||||
((ItemGunBaseNT) ModItems.gun_tesla_cannon) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_stg77) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_tau) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_fatman) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
|
||||
((ItemGunBaseNT) ModItems.gun_light_revolver_dani) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY_MIRROR, LegoClient.HUD_COMPONENT_AMMO_MIRROR);
|
||||
((ItemGunBaseNT) ModItems.gun_light_revolver_dani) .getConfig(null, 1).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
|
||||
@ -294,4 +294,17 @@ public class LegoClient {
|
||||
|
||||
GL11.glPopMatrix();
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_NUKE = (bullet, interp) -> {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.125F, 0.125F, 0.125F);
|
||||
GL11.glRotated(-90, 0, 1, 0);
|
||||
GL11.glTranslatef(0, -1, 1F);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.fatman_mininuke_tex);
|
||||
ResourceManager.fatman.renderPart("MiniNuke");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glPopMatrix();
|
||||
};
|
||||
}
|
||||
|
||||
@ -26,9 +26,9 @@ public class XFactoryCatapult {
|
||||
|
||||
public static void init() {
|
||||
|
||||
nuke_standard = new BulletConfig().setItem(EnumAmmo.NUKE_STANDARD);
|
||||
nuke_demo = new BulletConfig().setItem(EnumAmmo.NUKE_DEMO);
|
||||
nuke_high = new BulletConfig().setItem(EnumAmmo.NUKE_HIGH);
|
||||
nuke_standard = new BulletConfig().setItem(EnumAmmo.NUKE_STANDARD).setVel(3F).setGrav(0.025F);
|
||||
nuke_demo = new BulletConfig().setItem(EnumAmmo.NUKE_DEMO).setVel(3F).setGrav(0.025F);
|
||||
nuke_high = new BulletConfig().setItem(EnumAmmo.NUKE_HIGH).setVel(3F).setGrav(0.025F);
|
||||
|
||||
ModItems.gun_fatman = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(300).draw(7).inspect(40).crosshair(Crosshair.L_CIRCUMFLEX)
|
||||
|
||||
@ -49,11 +49,16 @@ public class ItemRenderFatMan extends ItemRenderWeaponBase {
|
||||
ResourceManager.fatman.renderPart("Handle");
|
||||
ResourceManager.fatman.renderPart("Gauge");
|
||||
ResourceManager.fatman.renderPart("Lid");
|
||||
ResourceManager.fatman.renderPart("Piston");
|
||||
|
||||
if(gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, null) > 0) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fatman_mininuke_tex);
|
||||
ResourceManager.fatman.renderPart("Piston");
|
||||
ResourceManager.fatman.renderPart("MiniNuke");
|
||||
} else {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0, 3);
|
||||
ResourceManager.fatman.renderPart("Piston");
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
@ -95,6 +95,28 @@ public class TileEntityMachineAmmoPress extends TileEntityMachineBase implements
|
||||
}
|
||||
}
|
||||
|
||||
public int[] access = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return access;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack stack, int j) {
|
||||
return i == 9;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
||||
if(slot > 8) return false;
|
||||
if(selectedRecipe < 0 || selectedRecipe >= AmmoPressRecipes.recipes.size()) return false;
|
||||
|
||||
AmmoPressRecipe recipe = AmmoPressRecipes.recipes.get(selectedRecipe);
|
||||
if(recipe.input[slot] == null) return false;
|
||||
return recipe.input[slot].matchesRecipe(stack, true);
|
||||
}
|
||||
|
||||
@Override public void serialize(ByteBuf buf) {
|
||||
super.serialize(buf);
|
||||
buf.writeInt(this.selectedRecipe);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user