purely an update to 1.20.1

This commit is contained in:
VenomCode 2023-06-26 00:37:53 -05:00
parent 4552ebb85b
commit 20ba50b566
6 changed files with 47 additions and 45 deletions

@ -15,17 +15,18 @@ jobs:
17, # Current Java LTS & minimum supported by Minecraft
]
# and run on both Linux and Windows
os: [ubuntu-20.04, windows-2022]
os: [ubuntu-22.04, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
@ -33,7 +34,7 @@ jobs:
run: ./gradlew build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Artifacts
path: build/libs/

@ -1,16 +1,16 @@
plugins {
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'fabric-loom' version '1.2-SNAPSHOT'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '7.0.0'
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
base {
archivesName = project.archives_base_name
}
repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
@ -18,8 +18,9 @@ repositories {
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
mavenCentral()
maven { url 'https://maven.nucleoid.xyz' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://jitpack.io' }
}
dependencies {
@ -36,10 +37,10 @@ dependencies {
modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
shadow(implementation('org.spongepowered:configurate-hocon:4.1.2'))
include(modImplementation("eu.pb4:polymer-core:${project.polymer_version}"))
include(modImplementation("xyz.nucleoid:server-translations-api:${project.server_translations_api_version}"))
modImplementation include("eu.pb4:polymer:${project.polymer_version}")
modImplementation include("fr.catcore:server-translations-api:${project.server_translation_api_version}")
shadow(implementation('org.spongepowered:configurate-hocon:4.1.2'))
}
processResources {
@ -51,7 +52,6 @@ processResources {
}
tasks.withType(JavaCompile).configureEach {
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
}
@ -60,21 +60,21 @@ java {
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
archiveClassifier.set("dev")
}
shadowJar {
configurations = [project.configurations.shadow]
archiveClassifier.set("dev")
relocate "net.objecthunter", "de.siphalor.spiceoffabric.shadow.net.objecthunter"
}
remapJar {
dependsOn(shadowJar)
inputFile = tasks.shadowJar.archiveFile

@ -1,18 +1,19 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.19.2
yarn_mappings=1.19.2+build.20
loader_version=0.14.9
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.2
loader_version=0.14.21
# Mod Properties
mod_version = 1.0.2
mod_version = 1.0.2+1.20.1
maven_group = dev.venomcode
archives_base_name = jumpvader
# Dependencies
fabric_version=0.62.0+1.19.2
polymer_version=0.2.16+1.19.2
server_translation_api_version=1.4.17+1.19.2
fabric_version=0.83.1+1.20.1
polymer_version=0.5.2+1.20.1
server_translations_api_version=2.0.0+1.20

@ -1,15 +1,15 @@
package dev.venomcode.jumpvader;
import dev.venomcode.jumpvader.blocks.JumpVaderBlock;
import eu.pb4.polymer.api.item.PolymerBlockItem;
import eu.pb4.polymer.core.api.item.PolymerBlockItem;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.Blocks;
import net.minecraft.block.Material;
import net.minecraft.item.Items;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -26,13 +26,13 @@ public class JumpVaderMod implements ModInitializer {
{
config = new JumpVaderConfig();
Registry.register( Registry.BLOCK, new Identifier(JumpVaderMod.MODID, "jumpvader_block"), JUMP_VADER_BLOCK);
Registry.register(Registries.BLOCK, new Identifier(JumpVaderMod.MODID, "jumpvader_block"), JUMP_VADER_BLOCK);
Registry.register( Registry.ITEM, new Identifier(JumpVaderMod.MODID, "jumpvader_block"), new PolymerBlockItem( JUMP_VADER_BLOCK, new FabricItemSettings(), Items.ORANGE_STAINED_GLASS ) );
Registry.register( Registries.ITEM, new Identifier(JumpVaderMod.MODID, "jumpvader_block"), new PolymerBlockItem( JUMP_VADER_BLOCK, new FabricItemSettings(), Items.ORANGE_STAINED_GLASS ) );
}
public static JumpVaderConfig getConfig()
{
return config;
}
public static final JumpVaderBlock JUMP_VADER_BLOCK = new JumpVaderBlock(FabricBlockSettings.of(Material.GLASS), Blocks.ORANGE_STAINED_GLASS);
public static final JumpVaderBlock JUMP_VADER_BLOCK = new JumpVaderBlock(FabricBlockSettings.copyOf(Blocks.BAMBOO_PLANKS), Blocks.ORANGE_STAINED_GLASS);
}

@ -2,12 +2,13 @@ package dev.venomcode.jumpvader.blocks;
import dev.venomcode.jumpvader.JumpVaderMod;
import dev.venomcode.jumpvader.ifaces.IJumpVaderListener;
import eu.pb4.polymer.api.block.SimplePolymerBlock;
import eu.pb4.polymer.core.api.block.PolymerBlock;
import eu.pb4.polymer.core.api.block.SimplePolymerBlock;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.Material;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.server.world.ServerWorld;
@ -16,11 +17,10 @@ import net.minecraft.sound.SoundEvents;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.BlockPos;
public class JumpVaderBlock extends SimplePolymerBlock implements IJumpVaderListener
{
public JumpVaderBlock(Settings settings, Block virtualBlock)
{
super(settings, virtualBlock);
public class JumpVaderBlock extends SimplePolymerBlock implements IJumpVaderListener {
public JumpVaderBlock(Settings settings, Block polymerBlock) {
super(settings, polymerBlock);
}
@Override
@ -29,7 +29,7 @@ public class JumpVaderBlock extends SimplePolymerBlock implements IJumpVaderList
if(!JumpVaderMod.getConfig().getEnabled())
return false;
pos = pos.up();
ServerWorld w = player.getWorld();
ServerWorld w = (ServerWorld) player.getWorld();
int count = 0;
while(count < JumpVaderMod.getConfig().getMaxVerticalBlocks() && pos.getY() < 316)
@ -63,7 +63,7 @@ public class JumpVaderBlock extends SimplePolymerBlock implements IJumpVaderList
return;
pos = pos.down();
ServerWorld w = player.getWorld();
ServerWorld w = (ServerWorld) player.getWorld();
int count = 0;
while(count < JumpVaderMod.getConfig().getMaxVerticalBlocks() && pos.getY() >= -64)

@ -27,10 +27,10 @@
],
"depends": {
"fabricloader": ">=0.14.9",
"fabric-api": "*",
"minecraft": "~1.19",
"java": ">=17"
"fabricloader": ">=0.14.21",
"minecraft": "~1.20.1",
"java": ">=17",
"fabric-api": "*"
},
"suggests": {
"another-mod": "*"