Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 30 additions & 10 deletions TODO.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

1.20.1-1.3.0-beta-8
1.20.1-1.3.0-beta-9

[✔] Done and tested
[🟡] Partially done and/or needs testing
Expand All @@ -22,21 +22,41 @@ New Heroes

Bugfixes
--------
[✔] Heroes can no longer pick up weapons and armour
[✔] Zombies summoned by necromancers no longer drop their weapons on death
[✔] Fixed the player defeated announcement text
[✔] Fixed grunts and villagers dealing too much damage to other units
[✔] Changing /gamerule groundYLevel no longer moves players that aren't in RTS cam (this was killing survival players!)
- This also happened whenever another player logged in
[✔] Destroying a farm now destroys all of its crop blocks
[✔] Campfires no longer do excessive damage
[✔] Creative players out of RTS cam are no longer locked into flying and noclip
[✔] Fixed the blizzard sound effect still continuing sometimes after the spell ends
[✔] Building a bridge overlapping resource blocks no longer makes those resources ungatherable
[✔] Libraries no longer try to autocast Vigor enchantments on Evokers that already have it

Quality of Life
---------------
[✔] The Royal Guard and Enchanter now have the collision size of regular illagers (visual size unchanged)
[✔] Warped Nylium now counts as nether terrain for piglins

Balance
-------
[✔] All damage dealt to huntable animals by military units is halved
[✔] Wretched Wraith bonus armour during blizzard increased from 30% to 50%
[✔] Wretched Wraith Frostblink mana cost reduced from 40 to 30, and cooldown reduced from (20,16,12) to (20,15,10)
[✔] The Wretched Wraith can no longer cause or receive knockback
[✔] Spider resource cost reduced from (90 food, 25 wood, 25 ore) to (80 food, 20 wood, 20 ore)
[✔] Spiders now glide smoothly up 1-block high steps without having to jump or climb

[✔] Piglin Merchant TNT Throw range increased from 12 to 14
[✔] Marauder Cleaving Flail damage to secondary targets reduced from 7 to 5 and stun from 1.5s to 1s
[✔] Piglin units lose their magma block immunity if they are actively on fire
[✔] Wildfire Molten Bomb no longer deals explosion damage (this was actually unintended)
[✔] Scorching gaze no longer causes 2x magma and fire block damage, but fire tick damage is raised to 3x
[✔] Blaze firewalls can now create fire blocks over snow
[✔] Fire Resistance now only affects Wither Skeletons and has been moved to the wither shrine
[✔] Fire Resistance cost reduced from (200 wood, 200 ore, 100s) to (125 wood, 125 ore, 60s)
[✔] Wither Skeletons now prioritise enemies that already have wither on them when autoattacking
[✔] Wither Skeletons now have 50% knockback resistance

[✔] Witch Water Potions extinguish radius increased from 1 block to 2 blocks
[✔] Raised water potion cooldown from 5s to 8s
[✔] Witch magic resistance reduced from 85% to 60%
[✔] Iron Golem HP reduced from 140 to 120, but ranged armour increased from 20% to 40%

[✔] Magic resistance now also reduces fire tick damage

Languages
---------
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ apply plugin: 'maven-publish'
apply plugin: 'org.spongepowered.mixin'
apply plugin: 'org.parchmentmc.librarian.forgegradle'

version = '1.3.0-beta-8'
version = '1.3.0-beta-9'
group = 'com.solegendary.reignofnether' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'reignofnether'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
public class ReignOfNether {
public static final Logger LOGGER = LogManager.getLogger();
public static final String MOD_ID = "reignofnether";
public static final String VERSION_STRING = "1.3.0-beta-8";
public static final String VERSION_STRING = "1.3.0-beta-9";

// Fields from ClientReset
public static final Field handshakeField;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.BowItem;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.enchantment.Enchantments;

import java.util.List;

Expand Down Expand Up @@ -75,4 +76,13 @@ public AbilityButton getButton(Keybinding hotkey, BuildingPlacement placement) {
public boolean isCorrectUnitAndEquipment(LivingEntity entity) {
return entity instanceof EvokerUnit && entity.getItemBySlot(equipmentSlot).getItem() instanceof BowItem;
}

@Override
public Enchantment getMutuallyExclusiveEnchant(LivingEntity entity) {
for (Enchantment enchantment : entity.getItemBySlot(equipmentSlot).getAllEnchantments().keySet()) {
if (enchantment == Enchantments.MULTISHOT || enchantment == getEnchantment())
return enchantment;
}
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@

public class ThrowWaterPotion extends Ability {

public static final int CD_MAX_SECONDS = 5;
public static final int CD_MAX_SECONDS = 8;

public final Potion potion = Potions.WATER;

//TODO Fix potionThrowRange for Witches gathering on a building
public ThrowWaterPotion(int potionThrowRange) {
super(
UnitAction.THROW_WATER_POTION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ public List<FormattedCharSequence> getRankUpTooltipLines(HeroUnit hero) {
fcs(I18n.get("abilities.reignofnether.fancy_feast.tooltip1")),
fcs(I18n.get("abilities.reignofnether.fancy_feast.tooltip2", BASE_ITEMS, BONUS_ITEMS_PER_100_RESOURCES, MANA_REFUND_PER_100_RESOURCES)),
fcs(""),
fcs(I18n.get("abilities.reignofnether.fancy_feast.rank1"), getRank(hero) == 0),
fcs(I18n.get("abilities.reignofnether.fancy_feast.rank2"), getRank(hero) == 1),
fcs(I18n.get("abilities.reignofnether.fancy_feast.rank3"), getRank(hero) == 2)
fcs(I18n.get("abilities.reignofnether.fancy_feast.rank1", HEALTH_PER_BREAD), getRank(hero) == 0),
fcs(I18n.get("abilities.reignofnether.fancy_feast.rank2", HEALTH_PER_CHICKEN), getRank(hero) == 1),
fcs(I18n.get("abilities.reignofnether.fancy_feast.rank3", HEALTH_PER_BEEF), getRank(hero) == 2)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

public class ThrowTNT extends HeroAbility {

public static final int RANGE = 12;
public static final int RANGE = 14;
public float explosionPower = 2;

// for some reason 0 and negative cooldown values cause this to stop working
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public class ScorchingGaze extends HeroAbility {
public static final int DURATION_RANK_3 = 14;
public int durationSeconds = DURATION_RANK_1;

public static final int MIN_MAGMA_DURATION = 200;
public static final int MAX_MAGMA_DURATION = 300;

public ScorchingGaze() {
super(3, 50, UnitAction.SCORCHING_GAZE, 30 * ResourceCost.TICKS_PER_SECOND, RANGE, 0, true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ public class FrostBlink extends HeroAbility {
public static final int RANGE_RANK_3 = 12;

public static final int CD_RANK_1 = 20;
public static final int CD_RANK_2 = 16;
public static final int CD_RANK_3 = 12;
public static final int CD_RANK_2 = 15;
public static final int CD_RANK_3 = 10;

public static final int RADIUS = 3;

public FrostBlink() {
super(3, 40, UnitAction.FROSTBLINK, CD_RANK_1 * ResourceCost.TICKS_PER_SECOND, RANGE_RANK_1, RADIUS, false);
super(3, 30, UnitAction.FROSTBLINK, CD_RANK_1 * ResourceCost.TICKS_PER_SECOND, RANGE_RANK_1, RADIUS, false);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import net.minecraft.world.level.block.state.BlockState;

public class WalkableMagmaBlock extends Block {
private static final int BUBBLE_COLUMN_CHECK_DELAY = 20;
public static final int DAMAGE_DELAY = 20; // higher == damage less often
public static final int DAMAGE = 3;

Expand All @@ -32,7 +31,7 @@ public WalkableMagmaBlock(BlockBehaviour.Properties pProperties) {
}

public void stepOn(Level pLevel, BlockPos pPos, BlockState pState, Entity pEntity) {
boolean isPiglinFaction = pEntity instanceof Unit unit && unit.getFaction() == Faction.PIGLINS;
boolean isPiglinFaction = pEntity instanceof Unit unit && unit.getFaction() == Faction.PIGLINS && !pEntity.isOnFire();
boolean isDamageTick = pEntity.tickCount % DAMAGE_DELAY == 0;

if (!pEntity.isSteppingCarefully() &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.solegendary.reignofnether.building.buildings.piglins.CentralPortal;
import com.solegendary.reignofnether.building.buildings.piglins.PortalBasic;
import com.solegendary.reignofnether.building.buildings.placements.BeaconPlacement;
import com.solegendary.reignofnether.building.buildings.placements.BridgePlacement;
import com.solegendary.reignofnether.building.buildings.placements.PortalPlacement;
import com.solegendary.reignofnether.building.buildings.placements.ProductionPlacement;
import com.solegendary.reignofnether.building.buildings.shared.AbstractBridge;
Expand All @@ -28,6 +29,9 @@
import com.solegendary.reignofnether.orthoview.OrthoviewClientEvents;
import com.solegendary.reignofnether.player.PlayerColors;
import com.solegendary.reignofnether.research.ResearchClient;
import com.solegendary.reignofnether.resources.BlockUtils;
import com.solegendary.reignofnether.resources.ResourceName;
import com.solegendary.reignofnether.resources.ResourceSources;
import com.solegendary.reignofnether.sandbox.SandboxClientEvents;
import com.solegendary.reignofnether.tutorial.TutorialClientEvents;
import com.solegendary.reignofnether.unit.Relationship;
Expand Down Expand Up @@ -123,8 +127,12 @@ public static int getTotalPopulationSupply(String playerName) {

// can only be one preselected building as you can't box-select them like units
public static BuildingPlacement getPreselectedBuilding() {
BlockPos preSelBp = CursorClientEvents.getPreselectedBlockPos();
for (BuildingPlacement building : buildings)
if (building.isPosInsideBuilding(CursorClientEvents.getPreselectedBlockPos())) {
if (building.isPosInsideBuilding(preSelBp)) {
if (building instanceof BridgePlacement && ResourceSources.getBlockResourceName(preSelBp, MC.level) != ResourceName.NONE) {
return null;
}
return building;
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.solegendary.reignofnether.building.buildings.monsters.Stronghold;
import com.solegendary.reignofnether.building.buildings.piglins.Fortress;
import com.solegendary.reignofnether.building.buildings.placements.BeaconPlacement;
import com.solegendary.reignofnether.building.buildings.placements.BridgePlacement;
import com.solegendary.reignofnether.building.buildings.placements.SculkCatalystPlacement;
import com.solegendary.reignofnether.building.buildings.shared.AbstractBridge;
import com.solegendary.reignofnether.building.buildings.villagers.Castle;
Expand Down Expand Up @@ -261,6 +262,19 @@ public static boolean isPosInsideAnyBuilding(boolean isClientSide, BlockPos bp)
return false;
}

public static boolean isPosInsideAnyNonBridgeBuilding(boolean isClientSide, BlockPos bp) {
List<BuildingPlacement> buildings;
if (isClientSide)
buildings = BuildingClientEvents.getBuildings();
else
buildings = BuildingServerEvents.getBuildings();

for (BuildingPlacement building : buildings)
if (!(building instanceof BridgePlacement) && building.isPosInsideBuilding(bp))
return true;
return false;
}

@Nullable
public static BuildingPlacement findClosestBuilding(boolean isClientSide, Vec3 pos, Predicate<BuildingPlacement> condition) {
List<BuildingPlacement> buildings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public FlameSanctuary() {
this.explodeChance = 0.2f;

this.productions.add(ProductionItems.RESEARCH_BLAZE_FIREWALL, Keybindings.keyQ);
this.productions.add(ProductionItems.RESEARCH_FIRE_RESISTANCE, Keybindings.keyW);
}

public Faction getFaction() {return Faction.PIGLINS;}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public WitherShrine() {
this.explodeChance = 0.2f;

this.productions.add(ProductionItems.RESEARCH_WITHER_CLOUDS, Keybindings.keyQ);
this.productions.add(ProductionItems.RESEARCH_FIRE_RESISTANCE, Keybindings.keyW);
}

public Faction getFaction() {return Faction.PIGLINS;}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ public static class UnitCosts implements Costs {
public static final ResourceCostConfigEntry BOGGED = ResourceCostConfigEntry.Unit(50,45,0,18,1, ResourceCosts.BOGGED, "Bogged Config");
public static final ResourceCostConfigEntry HUSK = ResourceCostConfigEntry.Unit(75,0,0,18,1, ResourceCosts.HUSK, "Husk Config");
public static final ResourceCostConfigEntry DROWNED = ResourceCostConfigEntry.Unit(75,0,0,18,1, ResourceCosts.DROWNED, "Drowned Config");
public static final ResourceCostConfigEntry SPIDER = ResourceCostConfigEntry.Unit(90,25,25,25,2, ResourceCosts.SPIDER, "Spider Config");
public static final ResourceCostConfigEntry POISON_SPIDER = ResourceCostConfigEntry.Unit(90,25,25,25,2, ResourceCosts.POISON_SPIDER, "Poison Spider Config");
public static final ResourceCostConfigEntry SPIDER = ResourceCostConfigEntry.Unit(80,20,20,25,2, ResourceCosts.SPIDER, "Spider Config");
public static final ResourceCostConfigEntry POISON_SPIDER = ResourceCostConfigEntry.Unit(80,20,20,25,2, ResourceCosts.POISON_SPIDER, "Poison Spider Config");
public static final ResourceCostConfigEntry SLIME = ResourceCostConfigEntry.Unit(40,40,40,25,2, ResourceCosts.SLIME, "Slime Config");
public static final ResourceCostConfigEntry WARDEN = ResourceCostConfigEntry.Unit(275,0,125,50,5, ResourceCosts.WARDEN, "Warden Config");
public static final ResourceCostConfigEntry NECROMANCER = ResourceCostConfigEntry.Unit(0,0,0,30, 5, ResourceCosts.NECROMANCER, "Necromancer Config");
Expand Down Expand Up @@ -304,7 +304,7 @@ public static class ResearchCosts implements Costs {
public static final ResourceCostConfigEntry RESEARCH_HEAVY_TRIDENTS = ResourceCostConfigEntry.Research(0, 300, 300, 150, ResourceCosts.RESEARCH_HEAVY_TRIDENTS, "Heavy Tridents Research Config");
public static final ResourceCostConfigEntry RESEARCH_CLEAVING_FLAILS = ResourceCostConfigEntry.Research(0, 350, 350, 160, ResourceCosts.RESEARCH_CLEAVING_FLAILS, "Cleaving Flails Research Config");
public static final ResourceCostConfigEntry RESEARCH_BLAZE_FIRE_WALL = ResourceCostConfigEntry.Research(400, 0, 300, 150, ResourceCosts.RESEARCH_BLAZE_FIRE_WALL, "Blaze Fire Wall Research Config");
public static final ResourceCostConfigEntry RESEARCH_FIRE_RESISTANCE = ResourceCostConfigEntry.Research(0, 200, 200, 100, ResourceCosts.RESEARCH_FIRE_RESISTANCE, "Fire Resistance Research Config");
public static final ResourceCostConfigEntry RESEARCH_FIRE_RESISTANCE = ResourceCostConfigEntry.Research(0, 125, 125, 60, ResourceCosts.RESEARCH_FIRE_RESISTANCE, "Fire Resistance Research Config");
public static final ResourceCostConfigEntry RESEARCH_WITHER_CLOUDS = ResourceCostConfigEntry.Research(250, 0, 350, 150, ResourceCosts.RESEARCH_WITHER_CLOUDS, "Wither Clouds Research Config");
public static final ResourceCostConfigEntry RESEARCH_BLOODLUST = ResourceCostConfigEntry.Research(250, 250, 250, 150, ResourceCosts.RESEARCH_BLOODLUST, "Bloodlust Research Config");
public static final ResourceCostConfigEntry RESEARCH_ADVANCED_PORTALS = ResourceCostConfigEntry.Research(0, 300, 300, 150, ResourceCosts.RESEARCH_ADVANCED_PORTALS, "Advanced Portals Research Config");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,24 @@ public void tick() {
Block blockBelow = this.level().getBlockState(this.getOnPos().below()).getBlock();
Block blockBelow2 = this.level().getBlockState(this.getOnPos().below().below()).getBlock();

if (List.of(Blocks.AIR, Blocks.TALL_GRASS, Blocks.GRASS, Blocks.CRIMSON_ROOTS).contains(blockBelow2)) {
List<Block> nonSolidBlocks = List.of(
Blocks.AIR, Blocks.TALL_GRASS, Blocks.GRASS,
Blocks.CRIMSON_ROOTS, Blocks.WARPED_ROOTS,
Blocks.DEAD_BUSH, Blocks.SNOW,
BlockRegistrar.WRAITH_SNOW_LAYER.get()
);
if (nonSolidBlocks.contains(blockBelow2)) {
meltSnow(this.getOnPos().below().below().below());
replacePathWithDirt(this.getOnPos().below().below().below());
this.level().setBlockAndUpdate(this.getOnPos().below().below(), fireState);
}
if (List.of(Blocks.AIR, Blocks.TALL_GRASS, Blocks.GRASS, Blocks.CRIMSON_ROOTS).contains(blockBelow)) {
if (nonSolidBlocks.contains(blockBelow)) {
meltSnow(this.getOnPos().below().below());
replacePathWithDirt(this.getOnPos().below().below());
this.level().setBlockAndUpdate(this.getOnPos().below(), fireState);
}
else if (List.of(Blocks.AIR, Blocks.TALL_GRASS, Blocks.GRASS, Blocks.CRIMSON_ROOTS).contains(block)) {
else if (nonSolidBlocks.contains(block)) {
meltSnow(this.getOnPos());
replacePathWithDirt(this.getOnPos());
this.level().setBlockAndUpdate(this.getOnPos(), fireState);
}
Expand All @@ -67,6 +76,11 @@ else if (List.of(Blocks.AIR, Blocks.TALL_GRASS, Blocks.GRASS, Blocks.CRIMSON_ROO
this.discard();
}

private void meltSnow(BlockPos bp) {
if (this.level().getBlockState(bp).getBlock() == BlockRegistrar.WRAITH_SNOW_LAYER.get() ||
this.level().getBlockState(bp).getBlock() == Blocks.SNOW)
this.level().setBlockAndUpdate(bp, Blocks.AIR.defaultBlockState());
}
private void replacePathWithDirt(BlockPos bp) {
if (this.level().getBlockState(bp).getBlock() == Blocks.DIRT_PATH)
this.level().setBlockAndUpdate(bp, Blocks.DIRT.defaultBlockState());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public boolean ignoreExplosion() {
}

protected void detonate() {
this.level().explode(this, this.getX(), this.getY(), this.getZ(), 2, false, Level.ExplosionInteraction.NONE);
level().explode(null, null, null, this.getX(), this.getEyeY(), this.getZ(),
2.0f, false, Level.ExplosionInteraction.NONE);

HashMap<BlockPos, Double> bpAndDists = new HashMap<>();

Expand Down Expand Up @@ -101,7 +102,9 @@ protected void detonate() {
}
List<Mob> mobs = MiscUtil.getEntitiesWithinRange(position(), moltenBomb.radius, Mob.class, level());
for (Mob mob : mobs) {
mob.hurt(damageSources().explosion(this.getOwner(), this), moltenBomb.damage);
if (mob.hurt(damageSources().explosion(this.getOwner(), this), moltenBomb.damage) && random.nextBoolean()) {
mob.setSecondsOnFire(5);
}
if (this.getOwner() instanceof LivingEntity le && le.hasEffect(MobEffectRegistrar.SOULS_AFLAME.get())) {
mob.addEffect(new MobEffectInstance(MobEffectRegistrar.SOULS_AFLAME.get(), 120, 0, false, false));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public abstract class PlayerMixin {
@Shadow public abstract int getId();
@Shadow public Level level;

/*
@Inject(
method = "tick()V",
at = @At("HEAD")
Expand All @@ -46,4 +47,5 @@ private void tick(CallbackInfo ci) {
}
}
}
*/
}
Loading