Skip to content

Commit 3a816d1

Browse files
Update for Minecraft 1.20.3
Some recipes are broken :(
1 parent 8f56c1a commit 3a816d1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+159
-134
lines changed

pom.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>me.eccentric_nz.TARDIS</groupId>
55
<artifactId>TARDIS</artifactId>
6-
<version>5.2.0</version>
6+
<version>5.3.0</version>
77
<name>TARDIS</name>
88
<description>A Doctor Who Plugin</description>
99
<properties>
@@ -163,9 +163,9 @@
163163
</goals>
164164
<id>remap-obf</id>
165165
<configuration>
166-
<srgIn>org.spigotmc:minecraft-server:1.20.2-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
166+
<srgIn>org.spigotmc:minecraft-server:1.20.3-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
167167
<reverse>true</reverse>
168-
<remappedDependencies>org.spigotmc:spigot:1.20.2-R0.1-SNAPSHOT:jar:remapped-mojang
168+
<remappedDependencies>org.spigotmc:spigot:1.20.3-R0.1-SNAPSHOT:jar:remapped-mojang
169169
</remappedDependencies>
170170
<remappedArtifactAttached>true</remappedArtifactAttached>
171171
<remappedClassifierName>remapped-obf</remappedClassifierName>
@@ -181,8 +181,8 @@
181181
<inputFile>
182182
${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar
183183
</inputFile>
184-
<srgIn>org.spigotmc:minecraft-server:1.20.2-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
185-
<remappedDependencies>org.spigotmc:spigot:1.20.2-R0.1-SNAPSHOT:jar:remapped-obf
184+
<srgIn>org.spigotmc:minecraft-server:1.20.3-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
185+
<remappedDependencies>org.spigotmc:spigot:1.20.3-R0.1-SNAPSHOT:jar:remapped-obf
186186
</remappedDependencies>
187187
</configuration>
188188
</execution>
@@ -273,7 +273,7 @@
273273
<dependency>
274274
<groupId>org.spigotmc</groupId>
275275
<artifactId>spigot</artifactId>
276-
<version>1.20.2-R0.1-SNAPSHOT</version>
276+
<version>1.20.3-R0.1-SNAPSHOT</version>
277277
<classifier>remapped-mojang</classifier>
278278
<scope>provided</scope>
279279
</dependency>

src/main/java/me/eccentric_nz/TARDIS/TARDIS.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public class TARDIS extends JavaPlugin {
133133
private final HashMap<String, String> versions = new HashMap<>();
134134
private final String versionRegex = "(\\d+[.])+\\d+";
135135
private final Pattern versionPattern = Pattern.compile(versionRegex);
136-
private final String serverStr = "1.20.2";
136+
private final String serverStr = "1.20.3";
137137
private TARDISChatGUI jsonKeeper;
138138
private TARDISUpdateChatGUI updateChatGUI;
139139
// public TARDISFurnaceRecipe fornacis;

src/main/java/me/eccentric_nz/TARDIS/api/TARDII.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
import me.eccentric_nz.tardisweepingangels.utils.Monster;
5757
import org.bukkit.*;
5858
import org.bukkit.World.Environment;
59-
import org.bukkit.craftbukkit.v1_20_R2.entity.CraftEntity;
59+
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
6060
import org.bukkit.entity.Entity;
6161
import org.bukkit.entity.LivingEntity;
6262
import org.bukkit.entity.Player;

src/main/java/me/eccentric_nz/TARDIS/chameleon/preset/biome/TARDISForestPreset.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ public TARDISForestPreset() {
5757
blueprintData[6][0] = "minecraft:dirt";
5858
blueprintData[6][1] = "minecraft:dirt";
5959
blueprintData[6][2] = "minecraft:grass_block";
60-
blueprintData[6][3] = "minecraft:grass";
60+
blueprintData[6][3] = "minecraft:short_grass";
6161
blueprintData[7][0] = "minecraft:oak_door[half=lower,hinge=right,facing=east,open=false]";
6262
blueprintData[7][1] = "minecraft:oak_door[half=upper,hinge=right,facing=east,open=false]";
6363
blueprintData[7][2] = "minecraft:oak_leaves";
6464
blueprintData[7][3] = "minecraft:air";
6565
blueprintData[8][0] = "minecraft:air";
6666
blueprintData[8][1] = "minecraft:air";
6767
blueprintData[8][2] = "minecraft:grass_block";
68-
blueprintData[8][3] = "minecraft:grass";
68+
blueprintData[8][3] = "minecraft:short_grass";
6969
blueprintData[9][0] = "minecraft:air";
7070
blueprintData[9][1] = "minecraft:air";
7171
blueprintData[9][2] = "minecraft:air";

src/main/java/me/eccentric_nz/TARDIS/chameleon/preset/biome/TARDISPlainsPreset.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -33,39 +33,39 @@ public TARDISPlainsPreset() {
3333
blueprintData[0][0] = "minecraft:dirt";
3434
blueprintData[0][1] = "minecraft:dirt";
3535
blueprintData[0][2] = "minecraft:grass_block";
36-
blueprintData[0][3] = "minecraft:grass";
36+
blueprintData[0][3] = "minecraft:short_grass";
3737
blueprintData[1][0] = "minecraft:dirt";
3838
blueprintData[1][1] = "minecraft:dirt";
3939
blueprintData[1][2] = "minecraft:grass_block";
40-
blueprintData[1][3] = "minecraft:grass";
40+
blueprintData[1][3] = "minecraft:short_grass";
4141
blueprintData[2][0] = "minecraft:dirt";
4242
blueprintData[2][1] = "minecraft:dirt";
4343
blueprintData[2][2] = "minecraft:grass_block";
44-
blueprintData[2][3] = "minecraft:grass";
44+
blueprintData[2][3] = "minecraft:short_grass";
4545
blueprintData[3][0] = "minecraft:dirt";
4646
blueprintData[3][1] = "minecraft:dirt";
4747
blueprintData[3][2] = "minecraft:grass_block";
4848
blueprintData[3][3] = "minecraft:air";
4949
blueprintData[4][0] = "minecraft:dirt";
5050
blueprintData[4][1] = "minecraft:dirt";
5151
blueprintData[4][2] = "minecraft:grass_block";
52-
blueprintData[4][3] = "minecraft:grass";
52+
blueprintData[4][3] = "minecraft:short_grass";
5353
blueprintData[5][0] = "minecraft:dirt";
5454
blueprintData[5][1] = "minecraft:dirt";
5555
blueprintData[5][2] = "minecraft:grass_block";
5656
blueprintData[5][3] = "minecraft:dandelion";
5757
blueprintData[6][0] = "minecraft:dirt";
5858
blueprintData[6][1] = "minecraft:dirt";
5959
blueprintData[6][2] = "minecraft:grass_block";
60-
blueprintData[6][3] = "minecraft:grass";
60+
blueprintData[6][3] = "minecraft:short_grass";
6161
blueprintData[7][0] = "minecraft:oak_door[half=lower,hinge=right,facing=east,open=false]";
6262
blueprintData[7][1] = "minecraft:oak_door[half=upper,hinge=right,facing=east,open=false]";
6363
blueprintData[7][2] = "minecraft:grass_block";
64-
blueprintData[7][3] = "minecraft:grass";
64+
blueprintData[7][3] = "minecraft:short_grass";
6565
blueprintData[8][0] = "minecraft:air";
6666
blueprintData[8][1] = "minecraft:air";
6767
blueprintData[8][2] = "minecraft:grass_block";
68-
blueprintData[8][3] = "minecraft:grass";
68+
blueprintData[8][3] = "minecraft:short_grass";
6969
blueprintData[9][0] = "minecraft:air";
7070
blueprintData[9][1] = "minecraft:air";
7171
blueprintData[9][2] = "minecraft:air";

src/main/java/me/eccentric_nz/TARDIS/chameleon/utils/TARDISStainedGlassLookup.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
import net.minecraft.world.level.block.Block;
2222
import net.minecraft.world.level.material.MapColor;
2323
import org.bukkit.*;
24-
import org.bukkit.craftbukkit.v1_20_R2.CraftWorld;
25-
import org.bukkit.craftbukkit.v1_20_R2.util.CraftMagicNumbers;
24+
import org.bukkit.craftbukkit.v1_20_R3.CraftWorld;
25+
import org.bukkit.craftbukkit.v1_20_R3.util.CraftMagicNumbers;
2626

2727
/**
2828
* Lookup for Chameleon preset block materialisation.
@@ -37,7 +37,7 @@ public static Material stainedGlassFromMaterial(World world, Material material)
3737
if (world == null) {
3838
world = Bukkit.getWorlds().get(0);
3939
}
40-
ServerLevel level = ((CraftWorld)world).getHandle();
40+
ServerLevel level = ((CraftWorld) world).getHandle();
4141
Block nmsBlock = CraftMagicNumbers.getBlock(material);
4242
MapColor mapColor = nmsBlock.defaultBlockState().getMapColor(level, new BlockPos(0, 75, 0));
4343
Color colorRGB = Color.fromRGB(mapColor.col);

src/main/java/me/eccentric_nz/TARDIS/control/TARDISControlListener.java

+11-6
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public void onControlInteract(PlayerInteractEvent event) {
9999
if (blockType.equals(Material.REPEATER)) {
100100
Repeater repeater = (Repeater) block.getBlockData();
101101
if (!repeater.isLocked()) {
102-
locStr = blockLocation.getWorld().getName() + ":" + blockLocation.blockX() + ":" + blockLocation.blockY() + ":" + blockLocation.blockZ();
102+
locStr = blockLocation.getWorld().getName() + ":" + blockLocation.getBlockX() + ":" + blockLocation.getBlockY() + ":" + blockLocation.getBlockZ();
103103
}
104104
}
105105
HashMap<String, Object> where = new HashMap<>();
@@ -157,7 +157,8 @@ public void onControlInteract(PlayerInteractEvent event) {
157157
if (action == Action.RIGHT_CLICK_BLOCK) {
158158
switch (type) {
159159
// random location button
160-
case 1 -> new RandomAction(plugin).process(cooldown, player, id, tardis, rsc.getSecondary());
160+
case 1 ->
161+
new RandomAction(plugin).process(cooldown, player, id, tardis, rsc.getSecondary());
161162
// console repeaters
162163
case 2, 3, 4, 5 -> new RepeaterAction(plugin).announce(player, block, type);
163164
// fast return button
@@ -169,7 +170,8 @@ public void onControlInteract(PlayerInteractEvent event) {
169170
// Temporal Locator sign
170171
case 11 -> new TemporarlLocatorAction(plugin).openGUI(player, tcc);
171172
// Control room light switch
172-
case 12 -> new LightSwitchAction(plugin, id, lights, player, tardis.getSchematic().getLights()).flickSwitch();
173+
case 12 ->
174+
new LightSwitchAction(plugin, id, lights, player, tardis.getSchematic().getLights()).flickSwitch();
173175
// TIS
174176
case 13 -> new TARDISInfoMenuButton(plugin, player).clickButton();
175177
// Disk Storage
@@ -194,7 +196,8 @@ public void onControlInteract(PlayerInteractEvent event) {
194196
new CustardCreamAction(plugin, player, block, id).dispense();
195197
}
196198
// force field
197-
case 29 -> new ForceFieldAction(plugin).toggleSheilds(player, blockLocation, tardis.getArtron_level());
199+
case 29 ->
200+
new ForceFieldAction(plugin).toggleSheilds(player, blockLocation, tardis.getArtron_level());
198201
// flight mode button
199202
case 30 -> new FlightModeAction(plugin).setMode(ownerUUID.toString(), player);
200203
// chameleon sign
@@ -208,7 +211,8 @@ public void onControlInteract(PlayerInteractEvent event) {
208211
}
209212
}
210213
// scanner
211-
case 33 -> new TARDISScanner(plugin).scan(player, id, tardis.getRenderer(), tardis.getArtron_level());
214+
case 33 ->
215+
new TARDISScanner(plugin).scan(player, id, tardis.getRenderer(), tardis.getArtron_level());
212216
// cloister bell
213217
case 35 -> new CloisterBellAction(plugin).ring(id, tardis);
214218
// weather menu
@@ -223,7 +227,8 @@ public void onControlInteract(PlayerInteractEvent event) {
223227
// zero room entry
224228
case 16 -> new ZeroRoomAction(plugin).doEntry(player, tardis, id);
225229
// maze exits
226-
case 40, 41, 42, 43 -> new MazeAction(plugin).reconfigure(type, player, id, blockLocation);
230+
case 40, 41, 42, 43 ->
231+
new MazeAction(plugin).reconfigure(type, player, id, blockLocation);
227232
default -> {
228233
}
229234
}

src/main/java/me/eccentric_nz/TARDIS/files/TARDISRecipesUpdater.java

+10-2
Original file line numberDiff line numberDiff line change
@@ -467,14 +467,22 @@ public void addRecipes() {
467467
recipes_config.set("shaped.Time Rotor Twelfth.lore", "");
468468
i++;
469469
}
470+
if (recipes_config.contains("shaped.Time Rotor Engine") && recipes_config.getString("shaped.Time Rotor Engine.hard_shape").equals("CRC,GWG,GRG")) {
471+
recipes_config.set("shaped.Time Rotor Engine.hard_shape", "BRB,GWG,GRG");
472+
i++;
473+
}
474+
if (recipes_config.contains("shaped.Time Engine") && recipes_config.getString("shaped.Time Engine.hard_shape").equals("CRC,GWG,GRG")) {
475+
recipes_config.set("shaped.Time Engine.hard_shape", "LRL,GAG,GRG");
476+
i++;
477+
}
470478
if (!recipes_config.contains("shaped.Time Rotor Engine")) {
471479
// rotor engine
472480
recipes_config.set("shaped.Time Rotor Engine.easy_shape", "BRB,GWG,GRG");
473481
recipes_config.set("shaped.Time Rotor Engine.easy_ingredients.B", "BLUE_DYE");
474482
recipes_config.set("shaped.Time Rotor Engine.easy_ingredients.R", "REDSTONE");
475483
recipes_config.set("shaped.Time Rotor Engine.easy_ingredients.W", "CLOCK");
476484
recipes_config.set("shaped.Time Rotor Engine.easy_ingredients.G", "GLASS_PANE");
477-
recipes_config.set("shaped.Time Rotor Engine.hard_shape", "CRC,GWG,GRG");
485+
recipes_config.set("shaped.Time Rotor Engine.hard_shape", "BRB,GWG,GRG");
478486
recipes_config.set("shaped.Time Rotor Engine.hard_ingredients.B", "BLUE_DYE");
479487
recipes_config.set("shaped.Time Rotor Engine.hard_ingredients.R", "REDSTONE_BLOCK");
480488
recipes_config.set("shaped.Time Rotor Engine.hard_ingredients.W", "CLOCK");
@@ -488,7 +496,7 @@ public void addRecipes() {
488496
recipes_config.set("shaped.Time Engine.easy_ingredients.R", "REDSTONE");
489497
recipes_config.set("shaped.Time Engine.easy_ingredients.A", "ANVIL");
490498
recipes_config.set("shaped.Time Engine.easy_ingredients.G", "GLASS_PANE");
491-
recipes_config.set("shaped.Time Engine.hard_shape", "CRC,GWG,GRG");
499+
recipes_config.set("shaped.Time Engine.hard_shape", "LRL,GAG,GRG");
492500
recipes_config.set("shaped.Time Engine.hard_ingredients.L", "LIGHT_BLUE_DYE");
493501
recipes_config.set("shaped.Time Engine.hard_ingredients.R", "REDSTONE_BLOCK");
494502
recipes_config.set("shaped.Time Engine.hard_ingredients.A", "ANVIL");

src/main/java/me/eccentric_nz/TARDIS/flight/TARDISChicken.java

-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ public boolean isChickenJockey() {
1515
return false;
1616
}
1717

18-
@Override
19-
public boolean canBreatheUnderwater() {
20-
return true;
21-
}
22-
2318
@Override
2419
public boolean isSensitiveToWater() {
2520
return false;

src/main/java/me/eccentric_nz/TARDIS/flight/TARDISExteriorFlight.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public void stopFlying(Player player, ArmorStand stand) {
109109
}
110110
Bukkit.getScheduler().scheduleSyncDelayedTask(TARDIS.plugin, () -> {
111111
COMPASS compass = COMPASS.valueOf(direction);
112-
stand.teleport(new Location(location.getWorld(), location.getBlockX() + 0.5d, location.blockY(), location.getBlockZ() + 0.5d, compass.getYaw(), 0.0f));
112+
stand.teleport(new Location(location.getWorld(), location.getBlockX() + 0.5d, location.getBlockY(), location.getBlockZ() + 0.5d, compass.getYaw(), 0.0f));
113113
});
114114
}
115115

src/main/java/me/eccentric_nz/TARDIS/recipes/TARDISShapedRecipe.java

+10-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*/
1717
package me.eccentric_nz.TARDIS.recipes;
1818

19-
import java.util.*;
2019
import me.eccentric_nz.TARDIS.TARDIS;
2120
import me.eccentric_nz.TARDIS.enumeration.Difficulty;
2221
import me.eccentric_nz.TARDIS.enumeration.DiskCircuit;
@@ -37,6 +36,8 @@
3736
import org.bukkit.potion.PotionData;
3837
import org.bukkit.potion.PotionType;
3938

39+
import java.util.*;
40+
4041
/**
4142
* @author eccentric_nz
4243
*/
@@ -88,7 +89,14 @@ public void addShapedRecipes() {
8889
keyModel = keyModelLookup.get(plugin.getConfig().getString("preferences.default_key").toLowerCase(Locale.ENGLISH));
8990
sonicModel = sonicModelLookup.get(plugin.getConfig().getString("preferences.default_sonic").toLowerCase(Locale.ENGLISH));
9091
Set<String> shaped = plugin.getRecipesConfig().getConfigurationSection("shaped").getKeys(false);
91-
shaped.forEach((s) -> plugin.getServer().addRecipe(makeRecipe(s)));
92+
shaped.forEach((s) -> {
93+
try {
94+
plugin.getServer().addRecipe(makeRecipe(s));
95+
} catch (IllegalArgumentException e) {
96+
plugin.debug("Invalid Recipe: " + ChatColor.RED + s);
97+
// e.printStackTrace();
98+
}
99+
});
92100
}
93101

94102
private ShapedRecipe makeRecipe(String s) {

0 commit comments

Comments
 (0)