mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
Fixed wrong class package, pom config and broken code (visual studio code compatibility)
This commit is contained in:
parent
668ad3f69e
commit
3ca57533b5
10 changed files with 21 additions and 53 deletions
|
@ -72,16 +72,19 @@ public final class TransformedImageCache {
|
|||
|
||||
static {
|
||||
// TODO: can we use a single map?
|
||||
IMAGE_CACHE = ImageCaches.register(SoftValuesLoadingCache.from(
|
||||
key -> SoftValuesLoadingCache.from(image -> {
|
||||
if (key.width != image.getWidth() || key.height != image.getHeight()) {
|
||||
image = resizeImage(image, key.width, key.height);
|
||||
}
|
||||
if (key.angle != 0.0) {
|
||||
image = rotateImage(image, key.angle);
|
||||
}
|
||||
return image;
|
||||
})));
|
||||
IMAGE_CACHE = ImageCaches.register(SoftValuesLoadingCache.from(TransformedImageCache::createTransformedImageCache));
|
||||
}
|
||||
|
||||
private static SoftValuesLoadingCache<BufferedImage, BufferedImage> createTransformedImageCache(Key key) {
|
||||
return SoftValuesLoadingCache.from(image -> {
|
||||
if (key.width != image.getWidth() || key.height != image.getHeight()) {
|
||||
image = resizeImage(image, key.width, key.height);
|
||||
}
|
||||
if (key.angle != 0.0) {
|
||||
image = rotateImage(image, key.angle);
|
||||
}
|
||||
return image;
|
||||
});
|
||||
}
|
||||
|
||||
private static BufferedImage rotateImage(BufferedImage image, double angle) {
|
||||
|
|
|
@ -329,41 +329,6 @@
|
|||
</plugins>
|
||||
|
||||
<finalName>mage-server</finalName>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>
|
||||
org.jvnet.jaxb2.maven2
|
||||
</groupId>
|
||||
<artifactId>
|
||||
maven-jaxb2-plugin
|
||||
</artifactId>
|
||||
<versionRange>
|
||||
[0.7.4,)
|
||||
</versionRange>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<properties/>
|
||||
|
|
|
@ -18,7 +18,7 @@ import mage.game.permanent.Permanent;
|
|||
import mage.game.permanent.token.SaprolingToken;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.FilterCreatureAttackingYou;
|
||||
import mage.filter.common.FilterCreatureAttackingYou;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,7 +17,7 @@ import mage.constants.SubType;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.target.common.FilterCreatureAttackingYou;
|
||||
import mage.filter.common.FilterCreatureAttackingYou;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,7 +17,7 @@ import mage.constants.SubType;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.target.common.FilterCreatureAttackingYou;
|
||||
import mage.filter.common.FilterCreatureAttackingYou;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
|
@ -15,7 +15,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.target.common.FilterCreatureAttackingYou;
|
||||
import mage.filter.common.FilterCreatureAttackingYou;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,7 +18,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.target.common.FilterCreatureAttackingYou;
|
||||
import mage.filter.common.FilterCreatureAttackingYou;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.FilterCreatureAttackingYou;
|
||||
import mage.filter.common.FilterCreatureAttackingYou;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,7 +17,7 @@ import mage.constants.Zone;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.FilterCreatureAttackingYou;
|
||||
import mage.filter.common.FilterCreatureAttackingYou;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
package mage.target.common;
|
||||
package mage.filter.common;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
|
|
Loading…
Reference in a new issue