Apply IJ code reformat

This commit is contained in:
Nassim Jahnke 2024-05-13 10:24:32 +02:00
parent b85046f11d
commit 903a49b96a
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
10 changed files with 26 additions and 23 deletions

View File

@ -8,7 +8,7 @@ tab_width = 4
[*.java] [*.java]
ij_java_class_count_to_use_import_on_demand = 999999 ij_java_class_count_to_use_import_on_demand = 999999
ij_java_names_count_to_use_import_on_demand = 999999 ij_java_names_count_to_use_import_on_demand = 999999
ij_java_imports_layout = *,|,$* ij_java_imports_layout = *, |, $*
ij_java_generate_final_locals = true ij_java_generate_final_locals = true
ij_java_generate_final_parameters = true ij_java_generate_final_parameters = true

View File

@ -10,13 +10,13 @@ allprojects {
} }
val main = setOf( val main = setOf(
projects.viabackwards, projects.viabackwards,
projects.viabackwardsCommon, projects.viabackwardsCommon,
projects.viabackwardsBukkit, projects.viabackwardsBukkit,
projects.viabackwardsBungee, projects.viabackwardsBungee,
projects.viabackwardsFabric, projects.viabackwardsFabric,
projects.viabackwardsSponge, projects.viabackwardsSponge,
projects.viabackwardsVelocity projects.viabackwardsVelocity
).map { it.dependencyProject } ).map { it.dependencyProject }
subprojects { subprojects {

View File

@ -40,9 +40,9 @@ public class FireDamageListener extends ViaBukkitListener {
EntityDamageEvent.DamageCause cause = event.getCause(); EntityDamageEvent.DamageCause cause = event.getCause();
if (cause != EntityDamageEvent.DamageCause.FIRE if (cause != EntityDamageEvent.DamageCause.FIRE
&& cause != EntityDamageEvent.DamageCause.FIRE_TICK && cause != EntityDamageEvent.DamageCause.FIRE_TICK
&& cause != EntityDamageEvent.DamageCause.LAVA && cause != EntityDamageEvent.DamageCause.LAVA
&& cause != EntityDamageEvent.DamageCause.DROWNING) { && cause != EntityDamageEvent.DamageCause.DROWNING) {
return; return;
} }

View File

@ -382,7 +382,7 @@ public abstract class LegacyBlockItemRewriter<C extends ClientboundPacketType, S
private record Pos(int x, short y, int z) { private record Pos(int x, short y, int z) {
public Pos( int x, int y, int z){ public Pos(int x, int y, int z) {
this(x, (short) y, z); this(x, (short) y, z);
} }
} }

View File

@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viabackwards.protocol.v1_13to1_12_2.block_entity_handlers; package com.viaversion.viabackwards.protocol.v1_13to1_12_2.block_entity_handlers;
import com.viaversion.viabackwards.protocol.v1_13to1_12_2.Protocol1_13To1_12_2; import com.viaversion.viabackwards.protocol.v1_13to1_12_2.Protocol1_13To1_12_2;
import com.viaversion.viabackwards.protocol.v1_13to1_12_2.provider.BackwardsBlockEntityProvider; import com.viaversion.viabackwards.protocol.v1_13to1_12_2.provider.BackwardsBlockEntityProvider;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;

View File

@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viabackwards.protocol.v1_19to1_18_2.storage; package com.viaversion.viabackwards.protocol.v1_19to1_18_2.storage;
import com.viaversion.viabackwards.protocol.v1_19to1_18_2.Protocol1_19To1_18_2; import com.viaversion.viabackwards.protocol.v1_19to1_18_2.Protocol1_19To1_18_2;
import com.viaversion.viaversion.api.connection.StorableObject; import com.viaversion.viaversion.api.connection.StorableObject;
import com.viaversion.viaversion.libs.fastutil.ints.Int2ObjectMap; import com.viaversion.viaversion.libs.fastutil.ints.Int2ObjectMap;

View File

@ -410,10 +410,10 @@ public final class Protocol1_20_3To1_20_2 extends BackwardsProtocol<ClientboundP
@Override @Override
protected PacketTypesProvider<ClientboundPacket1_20_3, ClientboundPacket1_20_2, ServerboundPacket1_20_3, ServerboundPacket1_20_2> createPacketTypesProvider() { protected PacketTypesProvider<ClientboundPacket1_20_3, ClientboundPacket1_20_2, ServerboundPacket1_20_3, ServerboundPacket1_20_2> createPacketTypesProvider() {
return new SimplePacketTypesProvider<>( return new SimplePacketTypesProvider<>(
packetTypeMap(unmappedClientboundPacketType, ClientboundPackets1_20_3.class, ClientboundConfigurationPackets1_20_3.class), packetTypeMap(unmappedClientboundPacketType, ClientboundPackets1_20_3.class, ClientboundConfigurationPackets1_20_3.class),
packetTypeMap(mappedClientboundPacketType, ClientboundPackets1_20_2.class, ClientboundConfigurationPackets1_20_2.class), packetTypeMap(mappedClientboundPacketType, ClientboundPackets1_20_2.class, ClientboundConfigurationPackets1_20_2.class),
packetTypeMap(mappedServerboundPacketType, ServerboundPackets1_20_3.class, ServerboundConfigurationPackets1_20_2.class), packetTypeMap(mappedServerboundPacketType, ServerboundPackets1_20_3.class, ServerboundConfigurationPackets1_20_2.class),
packetTypeMap(unmappedServerboundPacketType, ServerboundPackets1_20_2.class, ServerboundConfigurationPackets1_20_2.class) packetTypeMap(unmappedServerboundPacketType, ServerboundPackets1_20_2.class, ServerboundConfigurationPackets1_20_2.class)
); );
} }
} }

View File

@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viabackwards.protocol.v1_9_3to1_9_1.data; package com.viaversion.viabackwards.protocol.v1_9_3to1_9_1.data;
import com.viaversion.viabackwards.protocol.v1_9_3to1_9_1.Protocol1_9_3To1_9_1; import com.viaversion.viabackwards.protocol.v1_9_3to1_9_1.Protocol1_9_3To1_9_1;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.minecraft.Position; import com.viaversion.viaversion.api.minecraft.Position;

View File

@ -37,8 +37,8 @@ if (!isRelease || isMainBranch) { // Only publish releases from the main branch
modrinth { modrinth {
// val snapshotVersion = rootProject.parseMinecraftSnapshotVersion(project.version as String) // val snapshotVersion = rootProject.parseMinecraftSnapshotVersion(project.version as String)
val mcVersions: List<String> = (property("mcVersions") as String) val mcVersions: List<String> = (property("mcVersions") as String)
.split(",") .split(",")
.map { it.trim() } .map { it.trim() }
//.let { if (snapshotVersion != null) it + snapshotVersion else it } // We're usually too fast for modrinth //.let { if (snapshotVersion != null) it + snapshotVersion else it } // We're usually too fast for modrinth
token.set(System.getenv("MODRINTH_TOKEN")) token.set(System.getenv("MODRINTH_TOKEN"))

View File

@ -34,11 +34,11 @@ import java.nio.file.Path;
import java.util.logging.Logger; import java.util.logging.Logger;
@Plugin(id = "viabackwards", @Plugin(id = "viabackwards",
name = "ViaBackwards", name = "ViaBackwards",
version = VersionInfo.VERSION, version = VersionInfo.VERSION,
authors = {"Matsv", "kennytv", "Gerrygames", "creeper123123321", "ForceUpdate1", "EnZaXD"}, authors = {"Matsv", "kennytv", "Gerrygames", "creeper123123321", "ForceUpdate1", "EnZaXD"},
description = "Allows older Minecraft client versions to connect to newer server versions.", description = "Allows older Minecraft client versions to connect to newer server versions.",
dependencies = {@Dependency(id = "viaversion")} dependencies = {@Dependency(id = "viaversion")}
) )
public class VelocityPlugin implements ViaBackwardsPlatform { public class VelocityPlugin implements ViaBackwardsPlatform {
private Logger logger; private Logger logger;