purely an update to 1.20.1
This commit is contained in:
parent
4552ebb85b
commit
20ba50b566
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@ -15,17 +15,18 @@ jobs:
|
|||||||
17, # Current Java LTS & minimum supported by Minecraft
|
17, # Current Java LTS & minimum supported by Minecraft
|
||||||
]
|
]
|
||||||
# and run on both Linux and Windows
|
# and run on both Linux and Windows
|
||||||
os: [ubuntu-20.04, windows-2022]
|
os: [ubuntu-22.04, windows-2022]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: checkout repository
|
- name: checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: validate gradle wrapper
|
- name: validate gradle wrapper
|
||||||
uses: gradle/wrapper-validation-action@v1
|
uses: gradle/wrapper-validation-action@v1
|
||||||
- name: setup jdk ${{ matrix.java }}
|
- name: setup jdk ${{ matrix.java }}
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
java-version: ${{ matrix.java }}
|
java-version: ${{ matrix.java }}
|
||||||
|
distribution: 'microsoft'
|
||||||
- name: make gradle wrapper executable
|
- name: make gradle wrapper executable
|
||||||
if: ${{ runner.os != 'Windows' }}
|
if: ${{ runner.os != 'Windows' }}
|
||||||
run: chmod +x ./gradlew
|
run: chmod +x ./gradlew
|
||||||
@ -33,7 +34,7 @@ jobs:
|
|||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
- name: capture build artifacts
|
- name: capture build artifacts
|
||||||
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS
|
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:
|
with:
|
||||||
name: Artifacts
|
name: Artifacts
|
||||||
path: build/libs/
|
path: build/libs/
|
26
build.gradle
26
build.gradle
@ -1,16 +1,16 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '1.0-SNAPSHOT'
|
id 'fabric-loom' version '1.2-SNAPSHOT'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
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
|
version = project.mod_version
|
||||||
group = project.maven_group
|
group = project.maven_group
|
||||||
|
|
||||||
|
base {
|
||||||
|
archivesName = project.archives_base_name
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
// Add repositories to retrieve artifacts from in here.
|
// Add repositories to retrieve artifacts from in here.
|
||||||
// You should only use this when depending on other mods because
|
// 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
|
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
|
||||||
// for more information about repositories.
|
// for more information about repositories.
|
||||||
|
|
||||||
mavenCentral()
|
|
||||||
maven { url 'https://maven.nucleoid.xyz' }
|
maven { url 'https://maven.nucleoid.xyz' }
|
||||||
|
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
|
||||||
|
maven { url 'https://jitpack.io' }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@ -36,10 +37,10 @@ dependencies {
|
|||||||
|
|
||||||
modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
|
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}")
|
shadow(implementation('org.spongepowered:configurate-hocon:4.1.2'))
|
||||||
modImplementation include("fr.catcore:server-translations-api:${project.server_translation_api_version}")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
@ -51,7 +52,6 @@ processResources {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile).configureEach {
|
tasks.withType(JavaCompile).configureEach {
|
||||||
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
|
|
||||||
it.options.release = 17
|
it.options.release = 17
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,21 +60,21 @@ java {
|
|||||||
// if it is present.
|
// if it is present.
|
||||||
// If you remove this line, sources will not be generated.
|
// If you remove this line, sources will not be generated.
|
||||||
withSourcesJar()
|
withSourcesJar()
|
||||||
|
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
from("LICENSE") {
|
from("LICENSE") {
|
||||||
rename { "${it}_${project.archivesBaseName}"}
|
rename { "${it}_${project.archivesBaseName}"}
|
||||||
}
|
}
|
||||||
archiveClassifier.set("dev")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
configurations = [project.configurations.shadow]
|
configurations = [project.configurations.shadow]
|
||||||
archiveClassifier.set("dev")
|
archiveClassifier.set("dev")
|
||||||
relocate "net.objecthunter", "de.siphalor.spiceoffabric.shadow.net.objecthunter"
|
relocate "net.objecthunter", "de.siphalor.spiceoffabric.shadow.net.objecthunter"
|
||||||
}
|
}
|
||||||
|
|
||||||
remapJar {
|
remapJar {
|
||||||
dependsOn(shadowJar)
|
dependsOn(shadowJar)
|
||||||
inputFile = tasks.shadowJar.archiveFile
|
inputFile = tasks.shadowJar.archiveFile
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
# Done to increase the memory available to gradle.
|
# Done to increase the memory available to gradle.
|
||||||
org.gradle.jvmargs=-Xmx1G
|
org.gradle.jvmargs=-Xmx1G
|
||||||
|
org.gradle.parallel=true
|
||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
minecraft_version=1.19.2
|
minecraft_version=1.20.1
|
||||||
yarn_mappings=1.19.2+build.20
|
yarn_mappings=1.20.1+build.2
|
||||||
loader_version=0.14.9
|
loader_version=0.14.21
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.0.2
|
mod_version = 1.0.2+1.20.1
|
||||||
maven_group = dev.venomcode
|
maven_group = dev.venomcode
|
||||||
archives_base_name = jumpvader
|
archives_base_name = jumpvader
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.62.0+1.19.2
|
fabric_version=0.83.1+1.20.1
|
||||||
polymer_version=0.2.16+1.19.2
|
polymer_version=0.5.2+1.20.1
|
||||||
server_translation_api_version=1.4.17+1.19.2
|
server_translations_api_version=2.0.0+1.20
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
package dev.venomcode.jumpvader;
|
package dev.venomcode.jumpvader;
|
||||||
|
|
||||||
import dev.venomcode.jumpvader.blocks.JumpVaderBlock;
|
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.api.ModInitializer;
|
||||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.block.Material;
|
|
||||||
import net.minecraft.item.Items;
|
import net.minecraft.item.Items;
|
||||||
|
import net.minecraft.registry.Registries;
|
||||||
|
import net.minecraft.registry.Registry;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.registry.Registry;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@ -26,13 +26,13 @@ public class JumpVaderMod implements ModInitializer {
|
|||||||
{
|
{
|
||||||
config = new JumpVaderConfig();
|
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()
|
public static JumpVaderConfig getConfig()
|
||||||
{
|
{
|
||||||
return config;
|
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.JumpVaderMod;
|
||||||
import dev.venomcode.jumpvader.ifaces.IJumpVaderListener;
|
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.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
|
import net.minecraft.block.AbstractBlock;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.block.Material;
|
|
||||||
import net.minecraft.particle.ParticleTypes;
|
import net.minecraft.particle.ParticleTypes;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
import net.minecraft.server.world.ServerWorld;
|
import net.minecraft.server.world.ServerWorld;
|
||||||
@ -16,11 +17,10 @@ import net.minecraft.sound.SoundEvents;
|
|||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
public class JumpVaderBlock extends SimplePolymerBlock implements IJumpVaderListener
|
public class JumpVaderBlock extends SimplePolymerBlock implements IJumpVaderListener {
|
||||||
{
|
|
||||||
public JumpVaderBlock(Settings settings, Block virtualBlock)
|
public JumpVaderBlock(Settings settings, Block polymerBlock) {
|
||||||
{
|
super(settings, polymerBlock);
|
||||||
super(settings, virtualBlock);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -29,7 +29,7 @@ public class JumpVaderBlock extends SimplePolymerBlock implements IJumpVaderList
|
|||||||
if(!JumpVaderMod.getConfig().getEnabled())
|
if(!JumpVaderMod.getConfig().getEnabled())
|
||||||
return false;
|
return false;
|
||||||
pos = pos.up();
|
pos = pos.up();
|
||||||
ServerWorld w = player.getWorld();
|
ServerWorld w = (ServerWorld) player.getWorld();
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
while(count < JumpVaderMod.getConfig().getMaxVerticalBlocks() && pos.getY() < 316)
|
while(count < JumpVaderMod.getConfig().getMaxVerticalBlocks() && pos.getY() < 316)
|
||||||
@ -63,7 +63,7 @@ public class JumpVaderBlock extends SimplePolymerBlock implements IJumpVaderList
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
pos = pos.down();
|
pos = pos.down();
|
||||||
ServerWorld w = player.getWorld();
|
ServerWorld w = (ServerWorld) player.getWorld();
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
while(count < JumpVaderMod.getConfig().getMaxVerticalBlocks() && pos.getY() >= -64)
|
while(count < JumpVaderMod.getConfig().getMaxVerticalBlocks() && pos.getY() >= -64)
|
||||||
|
@ -27,10 +27,10 @@
|
|||||||
],
|
],
|
||||||
|
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.14.9",
|
"fabricloader": ">=0.14.21",
|
||||||
"fabric-api": "*",
|
"minecraft": "~1.20.1",
|
||||||
"minecraft": "~1.19",
|
"java": ">=17",
|
||||||
"java": ">=17"
|
"fabric-api": "*"
|
||||||
},
|
},
|
||||||
"suggests": {
|
"suggests": {
|
||||||
"another-mod": "*"
|
"another-mod": "*"
|
||||||
|
Loading…
Reference in New Issue
Block a user