Skip to content

Commit

Permalink
Version 1.18.1 for Minecraft 1.16.5
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Nov 12, 2021
1 parent 6b6ab71 commit e544cab
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 30 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<powermock.version>2.0.9</powermock.version>
<mongodb.version>3.12.8</mongodb.version>
<!-- More visible way to change dependency versions -->
<spigot.version>1.17-R0.1-SNAPSHOT</spigot.version>
<spigot.version>1.16.5-R0.1-SNAPSHOT</spigot.version>
<!-- Might differ from the last Spigot release for short periods
of time -->
<paper.version>1.16.5-R0.1-SNAPSHOT</paper.version>
Expand All @@ -83,7 +83,7 @@
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>1.18.1</build.version>
<build.version>1.16.6</build.version>
<sonar.organization>bentobox-world</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ private BlueprintBlock bluePrintBlock(Vector pos, Block block) {
// Signs
if (blockState instanceof Sign sign) {
b.setSignLines(Arrays.asList(sign.getLines()));
b.setGlowingText(sign.isGlowingText());
}
// Set block data
if (blockState.getData() instanceof Attachable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,6 @@ private void writeSign(final Block block, final List<String> lines, boolean glow
s.setLine(i, lines.get(i));
}
}
s.setGlowingText(glow);
// Update the sign
s.update();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package world.bentobox.bentobox.nms.v1_17_R1;
package world.bentobox.bentobox.nms.v1_16_R3;

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.block.data.BlockData;
import org.bukkit.craftbukkit.v1_17_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_17_R1.block.data.CraftBlockData;
import org.bukkit.craftbukkit.v1_16_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_16_R3.block.data.CraftBlockData;

import net.minecraft.core.BlockPosition;
import net.minecraft.world.level.World;
import net.minecraft.world.level.block.state.IBlockData;
import net.minecraft.world.level.chunk.Chunk;
import net.minecraft.server.v1_16_R3.BlockPosition;
import net.minecraft.server.v1_16_R3.Chunk;
import net.minecraft.server.v1_16_R3.IBlockData;
import net.minecraft.server.v1_16_R3.World;
import world.bentobox.bentobox.nms.NMSAbstraction;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,16 @@ public enum ServerVersion {
/**
* @since 1.16.0
*/
V1_16_5(Compatibility.INCOMPATIBLE),
V1_16_5(Compatibility.COMPATIBLE),

/**
* @since 1.17.0
*/
V1_17(Compatibility.COMPATIBLE),
V1_17(Compatibility.INCOMPATIBLE),
/**
* @since 1.17.1
*/
V1_17_1(Compatibility.COMPATIBLE)
V1_17_1(Compatibility.INCOMPATIBLE)
;

private final Compatibility compatibility;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: BentoBox
main: world.bentobox.bentobox.BentoBox
version: ${project.version}${build.number}
api-version: "1.17"
api-version: "1.16"

authors: [tastybento, Poslovitch]
contributors: ["The BentoBoxWorld Community"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void setUp() throws Exception {
when(plugin.getIWM()).thenReturn(iwm);
when(iwm.getAddon(any())).thenReturn(Optional.of(gma));
list = new ArrayList<>();
list.add("AXOLOTL");
//list.add("AXOLOTL");
list.add("BAT");
list.add("COW");
when(iwm.getMobLimitSettings(any())).thenReturn(list);
Expand All @@ -103,24 +103,20 @@ public void tearDown() {
@Test
public void testOnClick() {
GeoMobLimitTab tab = new GeoMobLimitTab(user, EntityLimitTabType.GEO_LIMIT, world);
// AXOLOTL, BAT, and COW in list
assertEquals(3, list.size());
assertEquals("COW", list.get(2));
assertEquals("BAT", list.get(1));
assertEquals("AXOLOTL", list.get(0));

// Click on AXOLOTL
tab.onClick(panel, user, ClickType.LEFT, 9);
list.forEach(System.out::println);
// BAT, and COW in list
assertEquals(2, list.size());
assertEquals("COW", list.get(1));
assertEquals("BAT", list.get(0));
// Click on AXOLOTL again to have it added

// Click on BAT
tab.onClick(panel, user, ClickType.LEFT, 9);
assertEquals(3, list.size());
assertEquals("BAT", list.get(0));
assertEquals("COW", list.get(1));
assertEquals("AXOLOTL", list.get(2));
assertEquals(1, list.size());
assertEquals("COW", list.get(0));
// Click on BAT again to have it added
tab.onClick(panel, user, ClickType.LEFT, 9);
assertEquals(2, list.size());
assertEquals("COW", list.get(0));
assertEquals("BAT", list.get(1));
verify(gma, times(2)).saveWorldSettings();
}

Expand Down

0 comments on commit e544cab

Please sign in to comment.