Skip to content

Commit

Permalink
Fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Thorinwasher committed Nov 19, 2023
1 parent 98d125b commit c6090a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ public enum ConfigurationOption {
/**
* The cost of creating a new stargate
*/
CREATION_COST("creationCost", "The cost of creating a new stargate", 0, OptionDataType.INTEGER, false),
CREATION_COST("creationCost", "The cost of creating a new stargate", 0.0, OptionDataType.INTEGER, false),

/**
* The cost of destroying a stargate
*/
DESTROY_COST("destructionCost", "The cost of destroying a stargate", 0, OptionDataType.INTEGER, false),
DESTROY_COST("destructionCost", "The cost of destroying a stargate", 0.0, OptionDataType.INTEGER, false),

/**
* The cost of using (teleporting through) a stargate
*/
USE_COST("usageCost", "The cost of using (teleporting through) a stargate", 0, OptionDataType.INTEGER, false),
USE_COST("usageCost", "The cost of using (teleporting through) a stargate", 0.0, OptionDataType.INTEGER, false),

/**
* Whether to send any transaction fees to the gate owner's balance
Expand Down
10 changes: 5 additions & 5 deletions src/test/java/org/sgrewritten/stargate/gate/GateTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ class GateTest {

@BeforeEach
void setUp() throws InvalidStructureException, GateConflictException {
List<GateFormat> gateFormats = GateFormatHandler.loadGateFormats(testGatesDir);
if (gateFormats == null) {
throw new IllegalStateException("Cannot get gate formats required for testing");
}
GateFormatRegistry.setFormats(gateFormats);
ServerMock server = MockBukkit.mock();
this.world = server.addSimpleWorld("world");
Location topLeft = new Location(world, 0, 6, 0);
BlockFace facing = BlockFace.SOUTH;
this.gateFileName = "nether.gate";
this.gateData = new GateData(GateFormatRegistry.getFormat(gateFileName),false,topLeft,facing);
this.signBlock = PortalBlockGenerator.generatePortal(gateData.topLeft().clone().subtract(new Vector(0, 4, 0)));
List<GateFormat> gateFormats = GateFormatHandler.loadGateFormats(testGatesDir);
if (gateFormats == null) {
throw new IllegalStateException("Cannot get gate formats required for testing");
}
GateFormatRegistry.setFormats(gateFormats);
}

@AfterEach
Expand Down

0 comments on commit c6090a5

Please sign in to comment.