Skip to content

Commit

Permalink
Updatate
Browse files Browse the repository at this point in the history
  • Loading branch information
enjarai committed Aug 19, 2024
1 parent 33043d7 commit b2c0aa9
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
11 changes: 3 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
- Removed event listening spell circles entirely. All placed circles now function purely as spell executors. (@enjarai)
- Significantly overhauled the Tome of Tomfoolery with new categories and better organisation. (@enjarai)
- Updated export string format to be more compact, the new version is incompatible with any exports from alpha 21. (@enjarai)
- Rebalanced the Conduit's Ploy by limiting the maximum tax ratio in vanilla to 1/20th of the used mana. (@enjarai)
- Additionally made all golems mana-devoid by default.
- Pehkui compat has been removed. (@enjarai)
- All scaling is now done using the vanilla scale attribute.
- Additionally, as a balancing measure, entities with changed scale will slowly revert back to their original scale over time.
- Modified the Tome of Tomfoolery again based on received feedback. (@enjarai)
- Made impulse flight with high ping slightly smoother. (@enjarai)
- Changed scale ploys to have a small grace period before starting to return to normal scale. (@enjarai)
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ deps.yarn=1.21+build.2
loader_version=0.15.11

# Mod Properties
mod_version=2.0.0-alpha.22
mod_version=2.0.0-alpha.23
maven_group=dev.enjarai
archives_base_name=trickster

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.math.BlockPos;
import org.joml.Vector3d;
import org.ladysnake.cca.api.v3.component.Component;
import org.ladysnake.cca.api.v3.component.ComponentKey;

import java.util.List;
import java.util.Optional;

public class BlockSpellSource extends SpellSource {
public final ServerWorld world;
Expand All @@ -33,6 +36,11 @@ public ManaPool getManaPool() {
return blockEntity.manaPool;
}

@Override
public <T extends Component> Optional<T> getComponent(ComponentKey<T> key) {
return key.maybeGet(blockEntity);
}

@Override
public float getHealth() {
return 25;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.server.world.ServerWorld;
import org.joml.Vector3d;
import org.ladysnake.cca.api.v3.component.Component;
import org.ladysnake.cca.api.v3.component.ComponentKey;

import java.util.*;
import java.util.function.Predicate;
Expand Down Expand Up @@ -77,6 +79,11 @@ public Optional<SpellExecutionManager> getExecutionManager() {
return Optional.of(ModEntityCumponents.CASTER.get(player).getExecutionManager());
}

@Override
public <T extends Component> Optional<T> getComponent(ComponentKey<T> key) {
return key.maybeGet(player);
}

@Override
public float getHealth() {
return player.getHealth();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.math.BlockPos;
import org.joml.Vector3d;
import org.ladysnake.cca.api.v3.component.Component;
import org.ladysnake.cca.api.v3.component.ComponentKey;

import java.util.*;
import java.util.function.Predicate;
Expand Down Expand Up @@ -41,6 +43,8 @@ public Optional<SpellExecutionManager> getExecutionManager() {
return Optional.empty();
}

public abstract <T extends Component> Optional<T> getComponent(ComponentKey<T> key);

public float getMana() {
return getManaPool().get();
}
Expand Down

0 comments on commit b2c0aa9

Please sign in to comment.