diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironment.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironment.java index 325c8495d..93f11b7f1 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironment.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironment.java @@ -239,10 +239,10 @@ public boolean isEnlightened() { */ public long extractMedia(long cost, boolean simulate) { for (var extractMediaComponent : preMediaExtract) - cost = extractMediaComponent.onExtractMedia(cost); + cost = extractMediaComponent.onExtractMedia(cost, simulate); cost = extractMediaEnvironment(cost, simulate); for (var extractMediaComponent : postMediaExtract) - cost = extractMediaComponent.onExtractMedia(cost); + cost = extractMediaComponent.onExtractMedia(cost, simulate); return cost; } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironmentComponent.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironmentComponent.java index faee1de0b..73f7775a4 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironmentComponent.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironmentComponent.java @@ -29,15 +29,15 @@ interface ExtractMedia extends CastingEnvironmentComponent { * remaining cost after deducting whatever cost source this component * is responsible for (should be >= 0) */ - long onExtractMedia(long cost); + long onExtractMedia(long cost, boolean simulate); /** - * ExtractMedia component that extracts media BEFORE the call to {@link CastingEnvironment#extractMediaEnvironment(long)} + * ExtractMedia component that extracts media BEFORE the call to {@link CastingEnvironment#extractMediaEnvironment(long, boolean)} */ interface Pre extends ExtractMedia {} /** - * ExtractMedia component that extracts media AFTER the call to {@link CastingEnvironment#extractMediaEnvironment(long)} + * ExtractMedia component that extracts media AFTER the call to {@link CastingEnvironment#extractMediaEnvironment(long, boolean)} * if the input is <= 0 you should also probably return 0 (since media cost was already paid off) */ interface Post extends ExtractMedia {}