the malicious gigglefish from the silly dimension

This commit is contained in:
Bob 2025-05-22 21:45:18 +02:00
parent d19894fa3d
commit 6a7dabbb1e
12 changed files with 117 additions and 59 deletions

View File

@ -3,13 +3,17 @@ package com.hbm.entity.projectile;
import java.util.List;
import com.hbm.explosion.ExplosionLarge;
import com.hbm.handler.threading.PacketThreading;
import com.hbm.lib.ModDamageSource;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
@ -22,63 +26,65 @@ public class EntityBuilding extends EntityThrowable {
this.ignoreFrustumCheck = true;
this.isImmuneToFire = true;
}
@Override
public void onUpdate() {
if(!worldObj.isRemote && this.ticksExisted == 1) {
for(int i = 0; i < 100; i++) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "bf");
PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(data,
posX + (rand.nextDouble() - 0.5) * 15,
posY + (rand.nextDouble() - 0.5) * 15,
posZ + (rand.nextDouble() - 0.5) * 15),
new TargetPoint(dimension, posX, posY, posZ, 150));
}
}
this.lastTickPosX = this.prevPosX = posX;
this.lastTickPosY = this.prevPosY = posY;
this.lastTickPosZ = this.prevPosZ = posZ;
this.setPosition(posX + this.motionX, posY + this.motionY, posZ + this.motionZ);
this.motionY -= 0.03;
if(motionY < -1.5)
motionY = -1.5;
if(this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ) != Blocks.air)
{
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:entity.oldExplosion", 10000.0F, 0.5F + this.rand.nextFloat() * 0.1F);
this.setDead();
ExplosionLarge.spawnParticles(worldObj, posX, posY + 3, posZ, 150);
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 6);
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 5);
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 4);
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 3);
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 3);
List<Entity> list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
AxisAlignedBB.getBoundingBox(posX - 8, posY - 8, posZ - 8, posX + 8, posY + 8, posZ + 8));
for(Entity e : list) {
e.attackEntityFrom(ModDamageSource.building, 1000);
}
for(int i = 0; i < 250; i++) {
Vec3 vec = Vec3.createVectorHelper(1, 0, 0);
vec.rotateAroundZ((float) (-rand.nextFloat() * Math.PI / 2));
vec.rotateAroundY((float) (rand.nextFloat() * Math.PI * 2));
EntityRubble rubble = new EntityRubble(worldObj, posX, posY + 3, posZ);
rubble.setMetaBasedOnBlock(Blocks.brick_block, 0);
rubble.motionX = vec.xCoord;
rubble.motionY = vec.yCoord;
rubble.motionZ = vec.zCoord;
worldObj.spawnEntityInWorld(rubble);
}
}
}
if(motionY < -1.5) motionY = -1.5;
if(this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.air) {
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:entity.oldExplosion", 10000.0F, 0.5F + this.rand.nextFloat() * 0.1F);
this.setDead();
ExplosionLarge.spawnParticles(worldObj, posX, posY + 3, posZ, 150);
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 6);
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 5);
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 4);
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 3);
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 3);
List<Entity> list = (List<Entity>) worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(posX - 8, posY - 8, posZ - 8, posX + 8, posY + 8, posZ + 8));
for(Entity e : list) e.attackEntityFrom(ModDamageSource.building, 1000);
for(int i = 0; i < 250; i++) {
Vec3 vec = Vec3.createVectorHelper(1, 0, 0);
vec.rotateAroundZ((float) (-rand.nextFloat() * Math.PI / 2));
vec.rotateAroundY((float) (rand.nextFloat() * Math.PI * 2));
EntityRubble rubble = new EntityRubble(worldObj, posX, posY + 3, posZ);
rubble.setMetaBasedOnBlock(Blocks.brick_block, 0);
rubble.motionX = vec.xCoord;
rubble.motionY = vec.yCoord;
rubble.motionZ = vec.zCoord;
worldObj.spawnEntityInWorld(rubble);
}
}
}
@Override protected void onImpact(MovingObjectPosition p_70184_1_) { }
@Override
protected void onImpact(MovingObjectPosition p_70184_1_) {
}
@Override
@SideOnly(Side.CLIENT)
public boolean isInRangeToRenderDist(double distance)
{
return distance < 25000;
}
public boolean isInRangeToRenderDist(double distance) {
return distance < 25000;
}
}

View File

@ -6410,6 +6410,8 @@ public class ModItems {
GameRegistry.registerItem(gun_stinger, gun_stinger.getUnlocalizedName());
GameRegistry.registerItem(gun_chemthrower, gun_chemthrower.getUnlocalizedName());
GameRegistry.registerItem(gun_amat, gun_amat.getUnlocalizedName());
GameRegistry.registerItem(gun_amat_subtlety, gun_amat_subtlety.getUnlocalizedName());
GameRegistry.registerItem(gun_amat_penance, gun_amat_penance.getUnlocalizedName());
GameRegistry.registerItem(gun_m2, gun_m2.getUnlocalizedName());
GameRegistry.registerItem(gun_autoshotgun, gun_autoshotgun.getUnlocalizedName());
GameRegistry.registerItem(gun_autoshotgun_shredder, gun_autoshotgun_shredder.getUnlocalizedName());

View File

@ -70,7 +70,9 @@ public class GunFactoryClient {
MinecraftForgeClient.registerItemRenderer(ModItems.gun_g3_zebra, new ItemRenderG3(ResourceManager.g3_zebra_tex));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_stinger, new ItemRenderStinger());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_chemthrower, new ItemRenderChemthrower());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_amat, new ItemRenderAmat());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_amat, new ItemRenderAmat(ResourceManager.amat_tex));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_amat_subtlety, new ItemRenderAmat(ResourceManager.amat_subtlety_tex));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_amat_penance, new ItemRenderAmat(ResourceManager.amat_penance_tex));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_m2, new ItemRenderM2());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_autoshotgun, new ItemRenderShredder(ResourceManager.shredder_tex));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_autoshotgun_shredder, new ItemRenderShredder(ResourceManager.shredder_orig_tex));
@ -258,6 +260,8 @@ public class GunFactoryClient {
((ItemGunBaseNT) ModItems.gun_stinger) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_chemthrower) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_amat) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_amat_subtlety) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_amat_penance) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_m2) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_autoshotgun) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_autoshotgun_shredder) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);

View File

@ -58,12 +58,11 @@ public class XFactory44 {
};
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_TORPEDO = (bullet, mop) -> {
EntityTorpedo pippo = new EntityTorpedo(bullet.worldObj);
pippo.posX = mop.hitVec.xCoord;
pippo.posY = mop.hitVec.yCoord + 50;
pippo.posZ = mop.hitVec.zCoord;;
bullet.worldObj.spawnEntityInWorld(pippo);
//bullet.worldObj.playSoundEffect(pippo.posX, pippo.posY + 50, pippo.posZ, "hbm:alarm.trainHorn", 100F, 1F);
EntityTorpedo murky = new EntityTorpedo(bullet.worldObj);
murky.posX = mop.hitVec.xCoord;
murky.posY = mop.hitVec.yCoord + 50;
murky.posZ = mop.hitVec.zCoord;;
bullet.worldObj.spawnEntityInWorld(murky);
bullet.setDead();
};

View File

@ -3,6 +3,7 @@ package com.hbm.items.weapon.sedna.factory;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import com.hbm.entity.projectile.EntityBuilding;
import com.hbm.entity.projectile.EntityBulletBaseMK4;
import com.hbm.items.ModItems;
import com.hbm.items.ItemEnums.EnumCasingType;
@ -37,6 +38,16 @@ public class XFactory50 {
public static BulletConfig bmg50_he;
public static BulletConfig bmg50_sm;
public static BulletConfig bmg50_black;
public static BulletConfig bmg50_equestrian;
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_BUILDING = (bullet, mop) -> {
EntityBuilding silver = new EntityBuilding(bullet.worldObj);
silver.posX = mop.hitVec.xCoord;
silver.posY = mop.hitVec.yCoord + 50;
silver.posZ = mop.hitVec.zCoord;;
bullet.worldObj.spawnEntityInWorld(silver);
bullet.setDead();
};
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3 && mop.entityHit == bullet.getThrower()) return;
@ -61,7 +72,9 @@ public class XFactory50 {
.setCasing(casing50.clone().setColor(SpentCasing.COLOR_CASE_44).register("bmg50sm"));
bmg50_black = new BulletConfig().setItem(EnumAmmoSecret.BMG50_BLACK).setWear(5F).setDoesPenetrate(true).setDamageFalloffByPen(false).setSpectral(true).setDamage(1.5F).setHeadshot(3F).setThresholdNegation(30F).setArmorPiercing(0.35F)
.setCasing(casing50.clone().setColor(SpentCasing.COLOR_CASE_EQUESTRIAN).register("bmg50black"));
bmg50_equestrian = new BulletConfig().setItem(EnumAmmoSecret.BMG50_EQUESTRIAN).setDamage(0F).setOnImpact(LAMBDA_BUILDING)
.setCasing(casing50.clone().setColor(SpentCasing.COLOR_CASE_EQUESTRIAN).register("bmg50equestrian"));
ModItems.gun_amat = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(350).draw(20).inspect(50).crosshair(Crosshair.CIRCLE).scopeTexture(XFactory44.scope_lilmac).smoke(LAMBDA_SMOKE)
.rec(new Receiver(0)
@ -72,6 +85,26 @@ public class XFactory50 {
.setupStandardConfiguration()
.anim(LAMBDA_AMAT_ANIMS).orchestra(Orchestras.ORCHESTRA_AMAT)
).setUnlocalizedName("gun_amat");
ModItems.gun_amat_subtlety = new ItemGunBaseNT(WeaponQuality.LEGENDARY, new GunConfig()
.dura(1_000).draw(20).inspect(50).crosshair(Crosshair.CIRCLE).scopeTexture(XFactory44.scope_lilmac).smoke(LAMBDA_SMOKE)
.rec(new Receiver(0)
.dmg(50F).delay(25).dry(25).spreadHipfire(0.05F).reload(51).jam(43).sound("hbm:weapon.fire.amat", 1.0F, 1.0F)
.mag(new MagazineFullReload(0, 7).addConfigs(bmg50_equestrian, bmg50_sp, bmg50_fmj, bmg50_jhp, bmg50_ap, bmg50_du, bmg50_sm, bmg50_he))
.offset(1, -0.0625 * 1.5, -0.25D)
.setupStandardFire().recoil(LAMBDA_RECOIL_AMAT))
.setupStandardConfiguration()
.anim(LAMBDA_AMAT_ANIMS).orchestra(Orchestras.ORCHESTRA_AMAT)
).setUnlocalizedName("gun_amat_subtlety");
ModItems.gun_amat_penance = new ItemGunBaseNT(WeaponQuality.LEGENDARY, new GunConfig()
.dura(5_000).draw(20).inspect(50).crosshair(Crosshair.CIRCLE).scopeTexture(XFactory44.scope_lilmac).thermalSights(true).smoke(LAMBDA_SMOKE)
.rec(new Receiver(0)
.dmg(45F).delay(25).dry(25).spreadHipfire(0F).reload(51).jam(43).sound("hbm:weapon.silencerShoot", 1.0F, 1.0F)
.mag(new MagazineFullReload(0, 7).addConfigs(bmg50_sp, bmg50_fmj, bmg50_jhp, bmg50_ap, bmg50_du, bmg50_sm, bmg50_he, bmg50_black))
.offset(1, -0.0625 * 1.5, -0.25D)
.setupStandardFire().recoil(LAMBDA_RECOIL_AMAT))
.setupStandardConfiguration()
.anim(LAMBDA_AMAT_ANIMS).orchestra(Orchestras.ORCHESTRA_AMAT)
).setUnlocalizedName("gun_amat_penance");
ModItems.gun_m2 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(3_000).draw(10).inspect(31).crosshair(Crosshair.L_CIRCLE).smoke(LAMBDA_SMOKE)

View File

@ -1322,7 +1322,7 @@ public class ModEventHandlerClient {
if(chestplate.thermal) thermalSights = true;
}
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemGunBaseNT) {
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemGunBaseNT && ItemGunBaseNT.aimingProgress == 1) {
ItemGunBaseNT gun = (ItemGunBaseNT) player.getHeldItem().getItem();
for(int i = 0; i < gun.getConfigCount(); i++) if(gun.getConfig(player.getHeldItem(), i).hasThermalSights(player.getHeldItem())) thermalSights = true;
}

View File

@ -998,6 +998,8 @@ public class ResourceManager {
public static final ResourceLocation g3_black_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/g3_polymer_black.png");
public static final ResourceLocation g3_attachments = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/g3_attachments.png");
public static final ResourceLocation amat_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/amat.png");
public static final ResourceLocation amat_subtlety_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/amat_subtlety.png");
public static final ResourceLocation amat_penance_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/amat_penance.png");
public static final ResourceLocation shredder_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/shredder.png");
public static final ResourceLocation shredder_orig_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/shredder_orig.png");
public static final ResourceLocation sexy_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/sexy.png");

View File

@ -2,6 +2,7 @@ package com.hbm.render.item.weapon.sedna;
import org.lwjgl.opengl.GL11;
import com.hbm.items.ModItems;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
import com.hbm.main.ResourceManager;
@ -9,8 +10,15 @@ import com.hbm.render.anim.HbmAnimations;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
public class ItemRenderAmat extends ItemRenderWeaponBase {
public ResourceLocation texture;
public ItemRenderAmat(ResourceLocation texture) {
this.texture = texture;
}
@Override
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.5F; }
@ -38,7 +46,7 @@ public class ItemRenderAmat extends ItemRenderWeaponBase {
if(isScoped && ItemGunBaseNT.prevAimingProgress == 1 && ItemGunBaseNT.aimingProgress == 1) return;
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.amat_tex);
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
double scale = 0.375D;
GL11.glScaled(scale, scale, scale);
@ -177,7 +185,7 @@ public class ItemRenderAmat extends ItemRenderWeaponBase {
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.amat_tex);
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
ResourceManager.amat.renderPart("Gun");
ResourceManager.amat.renderPart("Bolt");
ResourceManager.amat.renderPart("Magazine");
@ -202,6 +210,6 @@ public class ItemRenderAmat extends ItemRenderWeaponBase {
}
public boolean isSilenced(ItemStack stack) {
return WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SILENCER);
return stack.getItem() == ModItems.gun_amat_penance || WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SILENCER);
}
}

View File

@ -2071,6 +2071,8 @@ item.gun_aberrator_eott.name=Eyes Of The Tempest
item.gun_am180.name=.22er Maschinenpistole
item.gun_am180_silenced.name=Schallgedämpfte .22er Maschinenpistole
item.gun_amat.name=Panzerbüchse
item.gun_amat_penance.name=Penance
item.gun_amat_subtlety.name=Subtlety
item.gun_autoshotgun.name=Auto-Flinte
item.gun_autoshotgun_sexy.name=Sexy
item.gun_autoshotgun_shredder.name=Shredder

View File

@ -2882,6 +2882,8 @@ item.gun_aberrator_eott.name=Eyes Of The Tempest
item.gun_am180.name=.22 Submachine Gun
item.gun_am180_silenced.name=Silenced .22 Submachine Gun
item.gun_amat.name=Anti-Materiel Rifle
item.gun_amat_penance.name=Penance
item.gun_amat_subtlety.name=Subtlety
item.gun_autoshotgun.name=Auto Shotgun
item.gun_autoshotgun_sexy.name=Sexy
item.gun_autoshotgun_shredder.name=Shredder

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB