mirror of
https://github.com/correl/mage.git
synced 2024-12-01 11:09:56 +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,8 +72,11 @@ public final class TransformedImageCache {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// TODO: can we use a single map?
|
// TODO: can we use a single map?
|
||||||
IMAGE_CACHE = ImageCaches.register(SoftValuesLoadingCache.from(
|
IMAGE_CACHE = ImageCaches.register(SoftValuesLoadingCache.from(TransformedImageCache::createTransformedImageCache));
|
||||||
key -> SoftValuesLoadingCache.from(image -> {
|
}
|
||||||
|
|
||||||
|
private static SoftValuesLoadingCache<BufferedImage, BufferedImage> createTransformedImageCache(Key key) {
|
||||||
|
return SoftValuesLoadingCache.from(image -> {
|
||||||
if (key.width != image.getWidth() || key.height != image.getHeight()) {
|
if (key.width != image.getWidth() || key.height != image.getHeight()) {
|
||||||
image = resizeImage(image, key.width, key.height);
|
image = resizeImage(image, key.width, key.height);
|
||||||
}
|
}
|
||||||
|
@ -81,7 +84,7 @@ public final class TransformedImageCache {
|
||||||
image = rotateImage(image, key.angle);
|
image = rotateImage(image, key.angle);
|
||||||
}
|
}
|
||||||
return image;
|
return image;
|
||||||
})));
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static BufferedImage rotateImage(BufferedImage image, double angle) {
|
private static BufferedImage rotateImage(BufferedImage image, double angle) {
|
||||||
|
|
|
@ -329,41 +329,6 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
||||||
<finalName>mage-server</finalName>
|
<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>
|
</build>
|
||||||
|
|
||||||
<properties/>
|
<properties/>
|
||||||
|
|
|
@ -18,7 +18,7 @@ import mage.game.permanent.Permanent;
|
||||||
import mage.game.permanent.token.SaprolingToken;
|
import mage.game.permanent.token.SaprolingToken;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.FilterCreatureAttackingYou;
|
import mage.filter.common.FilterCreatureAttackingYou;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,7 +17,7 @@ import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||||
import mage.target.common.FilterCreatureAttackingYou;
|
import mage.filter.common.FilterCreatureAttackingYou;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,7 +17,7 @@ import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||||
import mage.target.common.FilterCreatureAttackingYou;
|
import mage.filter.common.FilterCreatureAttackingYou;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -15,7 +15,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||||
import mage.target.common.FilterCreatureAttackingYou;
|
import mage.filter.common.FilterCreatureAttackingYou;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,7 +18,7 @@ import mage.constants.Duration;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||||
import mage.target.common.FilterCreatureAttackingYou;
|
import mage.filter.common.FilterCreatureAttackingYou;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,7 +11,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.target.common.FilterCreatureAttackingYou;
|
import mage.filter.common.FilterCreatureAttackingYou;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,7 +17,7 @@ import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.FilterCreatureAttackingYou;
|
import mage.filter.common.FilterCreatureAttackingYou;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
package mage.target.common;
|
package mage.filter.common;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.filter.common.FilterAttackingCreature;
|
import mage.filter.common.FilterAttackingCreature;
|
||||||
|
|
Loading…
Reference in a new issue