Skip to content

Commit

Permalink
Balancing
Browse files Browse the repository at this point in the history
  • Loading branch information
doctor4t committed May 15, 2022
1 parent 0d8dca4 commit 336e3c2
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 13 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@
### BLAST 1.9 - 1.18.2
- Removed bombards
- Added amethyst, frost and slime bombs, replacing the uses of the removed bombards
- Bombs now have a 4 second cooldown when used in gamemodes other than creative, the cooldown applies to all bomb items
- Bombs now have a 1 second cooldown when used in gamemodes other than creative, the cooldown applies to all bomb items
- Reduced bomb maximum stack size to 16
- Reduced amethyst and frost bomb shrapnel count from 250 to 70
- Increased amethyst and frost bomb shrapnel speed from 0.6 to 1.4
- Removed amethyst shards bypassing invulnerability ticks
- Increased amethyst shard damage from 2 to 8
- Divided utility explosion damage (bombs, diamond bombs, golden bombs, etc...) by 3
- Reduced damage of icicles from 0.5 to 0.01
- Icicles bypass armor and no longer damage it

### BLAST 1.8.5 - 1.18.2
- Added compatibility with Enchancement and other mods that may remove the Fortune enchantment from the registry
Expand Down
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

loom {
accessWidenerPath = file("src/main/resources/blast.accesswidener")
}

dependencies {
//to change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ protected Item getDefaultItem() {

@Override
protected CustomExplosion getExplosion() {
return new EntityExplosion(this.world, this.getOwner(), this.getX(), this.getY(), this.getZ(), BlastEntities.AMETHYST_SHARD, 250, 0.6f);
return new EntityExplosion(this.world, this.getOwner(), this.getX(), this.getY(), this.getZ(), BlastEntities.AMETHYST_SHARD, 70, 1.4f);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected Item getDefaultItem() {

@Override
protected CustomExplosion getExplosion() {
return new EntityExplosion(this.world, this.getOwner(), this.getX(), this.getY(), this.getZ(), BlastEntities.AMETHYST_SHARD, 250, 0.6f);
return new EntityExplosion(this.world, this.getOwner(), this.getX(), this.getY(), this.getZ(), BlastEntities.AMETHYST_SHARD, 70, 1.4f);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ protected Item getDefaultItem() {

@Override
protected CustomExplosion getExplosion() {
return new EntityExplosion(this.world, this.getOwner(), this.getX(), this.getY(), this.getZ(), BlastEntities.ICICLE, 250, 0.6f);
return new EntityExplosion(this.world, this.getOwner(), this.getX(), this.getY(), this.getZ(), BlastEntities.ICICLE, 70, 1.4f);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected Item getDefaultItem() {

@Override
protected CustomExplosion getExplosion() {
return new EntityExplosion(this.world, this.getOwner(), this.getX(), this.getY(), this.getZ(), BlastEntities.ICICLE, 250, 0.6f);
return new EntityExplosion(this.world, this.getOwner(), this.getX(), this.getY(), this.getZ(), BlastEntities.ICICLE, 70, 1.4f);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class AmethystShardEntity extends PersistentProjectileEntity {
public AmethystShardEntity(EntityType<? extends AmethystShardEntity> entityType, World world) {
super(entityType, world);
this.setSound(this.getHitSound());
this.setDamage(2);
this.setDamage(8);
this.pickupType = PickupPermission.DISALLOWED;
}

Expand Down Expand Up @@ -70,6 +70,13 @@ public void tick() {
}
}
}

if (this.age < 10) {
for (LivingEntity livingEntity : world.getEntitiesByClass(LivingEntity.class, this.getBoundingBox().expand(1f), LivingEntity::isAlive)) {
this.onEntityHit(new EntityHitResult(livingEntity));
this.kill();
}
}
}

@Override
Expand Down Expand Up @@ -110,8 +117,6 @@ protected void onEntityHit(EntityHitResult entityHitResult) {
if (entity2 != null && livingEntity != entity2 && livingEntity instanceof PlayerEntity && entity2 instanceof ServerPlayerEntity && !this.isSilent()) {
((ServerPlayerEntity) entity2).networkHandler.sendPacket(new GameStateChangeS2CPacket(GameStateChangeS2CPacket.PROJECTILE_HIT_PLAYER, GameStateChangeS2CPacket.DEMO_OPEN_SCREEN));
}

livingEntity.timeUntilRegen = 0;
}
} else {
entity.setFireTicks(j);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class IcicleEntity extends AmethystShardEntity {

public IcicleEntity(EntityType<? extends AmethystShardEntity> entityType, World world) {
super(entityType, world);
this.setDamage(0.5f);
this.setDamage(0.01f);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static DamageSource amethystShard(PersistentProjectileEntity projectile,
}

public static DamageSource icicle(PersistentProjectileEntity projectile, @Nullable Entity attacker) {
return (new ProjectileDamageSource("icicle", projectile, attacker)).setProjectile();
return (new ProjectileDamageSource("icicle", projectile, attacker)).setProjectile().setBypassesArmor();
}

}
2 changes: 1 addition & 1 deletion src/main/java/ladysnake/blast/common/item/BombItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public TypedActionResult<ItemStack> use(World world, PlayerEntity playerEntity,
if (!playerEntity.isCreative()) {
for (int i = 0; i < playerEntity.getInventory().size(); i++) {
if (playerEntity.getInventory().getStack(i).getItem() instanceof BombItem || playerEntity.getInventory().getStack(i).getItem() instanceof TriggerBombItem) {
playerEntity.getItemCooldownManager().set(playerEntity.getInventory().getStack(i).getItem(), 80);
playerEntity.getItemCooldownManager().set(playerEntity.getInventory().getStack(i).getItem(), 20);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public void collectBlocksAndDamageEntities() {
double ad = getExposure(vec3d, entity);
double ae = (1.0D - y) * ad;
if (!(entity instanceof ExperienceOrbEntity || entity instanceof ItemEntity)) {
entity.damage(this.getDamageSource(), (float) ((int) ((ae * ae + ae) / 2.0D * 7.0D * (double) q + 1.0D)));
entity.damage(this.getDamageSource(), (float) ((int) ((ae * ae + ae) / 2.0D * 7.0D * (double) q + 1.0D))/3f);
}
double af = ae;
if (entity instanceof LivingEntity) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.projectile.ProjectileEntity;
import net.minecraft.util.math.Box;
import net.minecraft.world.World;

public class EntityExplosion extends CustomExplosion {
Expand Down Expand Up @@ -32,7 +34,6 @@ public void collectBlocksAndDamageEntities() {
entity.setVelocity(random.nextGaussian() * velocity, random.nextGaussian() * velocity, random.nextGaussian() * velocity);

world.spawnEntity(entity);

}
}
}
3 changes: 3 additions & 0 deletions src/main/resources/blast.accesswidener
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessWidener v1 named

accessible method net/minecraft/entity/damage/DamageSource setBypassesArmor ()Lnet/minecraft/entity/damage/DamageSource;
1 change: 1 addition & 0 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"ladysnake.blast.client.BlastClient"
]
},
"accessWidener": "blast.accesswidener",
"depends": {
"fabricloader": ">=0.13.3",
"minecraft": "~1.18.2",
Expand Down

0 comments on commit 336e3c2

Please sign in to comment.