Update to 1.17.x
This commit is contained in:
parent
93b50958a0
commit
fdbe730ca6
36
build.gradle
36
build.gradle
|
@ -1,18 +1,18 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '0.5-SNAPSHOT'
|
id 'fabric-loom' version '0.9-SNAPSHOT'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_16
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
targetCompatibility = JavaVersion.VERSION_16
|
||||||
|
|
||||||
archivesBaseName = project.archives_base_name
|
archivesBaseName = project.archives_base_name
|
||||||
version = project.mod_version
|
version = project.mod_version + "-" + project.minecraft_version
|
||||||
group = project.maven_group
|
group = project.maven_group
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url "http://maven.terraformersmc.com/releases/"
|
url "https://maven.terraformersmc.com/releases/"
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
name = 'Ladysnake Mods'
|
name = 'Ladysnake Mods'
|
||||||
|
@ -70,8 +70,9 @@ processResources {
|
||||||
// ensure that the encoding is set to UTF-8, no matter what the system default is
|
// ensure that the encoding is set to UTF-8, no matter what the system default is
|
||||||
// this fixes some edge cases with special characters not displaying correctly
|
// this fixes some edge cases with special characters not displaying correctly
|
||||||
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
|
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile).configureEach {
|
||||||
options.encoding = "UTF-8"
|
it.options.encoding = "UTF-8"
|
||||||
|
it.options.release = 16
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||||
|
@ -85,24 +86,3 @@ task sourcesJar(type: Jar, dependsOn: classes) {
|
||||||
jar {
|
jar {
|
||||||
from "LICENSE"
|
from "LICENSE"
|
||||||
}
|
}
|
||||||
|
|
||||||
// configure the maven publication
|
|
||||||
publishing {
|
|
||||||
publications {
|
|
||||||
mavenJava(MavenPublication) {
|
|
||||||
// add all the jars that should be included when publishing to maven
|
|
||||||
artifact(remapJar) {
|
|
||||||
builtBy remapJar
|
|
||||||
}
|
|
||||||
artifact(sourcesJar) {
|
|
||||||
builtBy remapSourcesJar
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// select the repositories you want to publish to
|
|
||||||
repositories {
|
|
||||||
// uncomment to publish to the local maven
|
|
||||||
// mavenLocal()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G
|
||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
minecraft_version=1.16.5
|
minecraft_version=1.17.1
|
||||||
yarn_mappings=1.16.5+build.9
|
yarn_mappings=1.17.1+build.59
|
||||||
loader_version=0.11.3
|
loader_version=0.11.6
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.1
|
mod_version = 1.1
|
||||||
|
@ -14,7 +14,7 @@ org.gradle.jvmargs=-Xmx1G
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||||
fabric_version=0.34.2+1.16
|
fabric_version=0.40.0+1.17
|
||||||
modmenu_version=1.16.9
|
modmenu_version=2.0.10
|
||||||
cca_version=2.8.3
|
cca_version=3.1.1
|
||||||
cloth_version=4.11.26
|
cloth_version=5.0.38
|
|
@ -1,5 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
|
@ -14,7 +14,7 @@ import dev.onyxstudios.cca.api.v3.entity.EntityComponentFactoryRegistry;
|
||||||
import dev.onyxstudios.cca.api.v3.entity.EntityComponentInitializer;
|
import dev.onyxstudios.cca.api.v3.entity.EntityComponentInitializer;
|
||||||
import me.shedaniel.autoconfig.AutoConfig;
|
import me.shedaniel.autoconfig.AutoConfig;
|
||||||
import me.shedaniel.autoconfig.serializer.Toml4jConfigSerializer;
|
import me.shedaniel.autoconfig.serializer.Toml4jConfigSerializer;
|
||||||
import nerdhub.cardinal.components.api.util.RespawnCopyStrategy;
|
import dev.onyxstudios.cca.api.v3.entity.RespawnCopyStrategy;
|
||||||
import net.fabricmc.api.ModInitializer;
|
import net.fabricmc.api.ModInitializer;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.damage.DamageSource;
|
import net.minecraft.entity.damage.DamageSource;
|
||||||
|
|
|
@ -27,11 +27,12 @@ import net.minecraft.util.registry.BuiltinRegistries;
|
||||||
import net.minecraft.util.registry.Registry;
|
import net.minecraft.util.registry.Registry;
|
||||||
import net.minecraft.util.registry.RegistryKey;
|
import net.minecraft.util.registry.RegistryKey;
|
||||||
import net.minecraft.world.gen.GenerationStep;
|
import net.minecraft.world.gen.GenerationStep;
|
||||||
import net.minecraft.world.gen.decorator.Decorator;
|
import net.minecraft.world.gen.YOffset;
|
||||||
import net.minecraft.world.gen.decorator.RangeDecoratorConfig;
|
import net.minecraft.world.gen.decorator.RangeDecoratorConfig;
|
||||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||||
import net.minecraft.world.gen.feature.Feature;
|
import net.minecraft.world.gen.feature.Feature;
|
||||||
import net.minecraft.world.gen.feature.OreFeatureConfig;
|
import net.minecraft.world.gen.feature.OreFeatureConfig;
|
||||||
|
import net.minecraft.world.gen.heightprovider.UniformHeightProvider;
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public class AsbestosRegistry {
|
public class AsbestosRegistry {
|
||||||
|
@ -79,8 +80,9 @@ public class AsbestosRegistry {
|
||||||
private static ConfiguredFeature<?, ?> SERPENTINITE_OVERWORLD = Feature.ORE
|
private static ConfiguredFeature<?, ?> SERPENTINITE_OVERWORLD = Feature.ORE
|
||||||
.configure(new OreFeatureConfig(OreFeatureConfig.Rules.BASE_STONE_OVERWORLD,
|
.configure(new OreFeatureConfig(OreFeatureConfig.Rules.BASE_STONE_OVERWORLD,
|
||||||
SERPENTINITE_BLOCK.getDefaultState(), 5))
|
SERPENTINITE_BLOCK.getDefaultState(), 5))
|
||||||
.decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(0, 0, 32))).spreadHorizontally()
|
.range(new RangeDecoratorConfig(
|
||||||
.repeat(10);
|
UniformHeightProvider.create(YOffset.aboveBottom(0), YOffset.fixed(32))))
|
||||||
|
.spreadHorizontally().repeat(10);
|
||||||
|
|
||||||
public static void register() {
|
public static void register() {
|
||||||
// asbestos fibers item
|
// asbestos fibers item
|
||||||
|
@ -117,8 +119,7 @@ public class AsbestosRegistry {
|
||||||
|
|
||||||
// serpentinite worldgen
|
// serpentinite worldgen
|
||||||
RegistryKey<ConfiguredFeature<?, ?>> serpentiniteOverworld = RegistryKey.of(
|
RegistryKey<ConfiguredFeature<?, ?>> serpentiniteOverworld = RegistryKey.of(
|
||||||
Registry.CONFIGURED_FEATURE_WORLDGEN,
|
Registry.CONFIGURED_FEATURE_KEY, new Identifier("asbestos", "serpentinite_overworld"));
|
||||||
new Identifier("asbestos", "serpentinite_overworld"));
|
|
||||||
|
|
||||||
Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, serpentiniteOverworld.getValue(),
|
Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, serpentiniteOverworld.getValue(),
|
||||||
SERPENTINITE_OVERWORLD);
|
SERPENTINITE_OVERWORLD);
|
||||||
|
|
|
@ -5,13 +5,13 @@ import me.shedaniel.autoconfig.AutoConfig;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.entity.effect.StatusEffect;
|
import net.minecraft.entity.effect.StatusEffect;
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||||
import net.minecraft.entity.effect.StatusEffectType;
|
import net.minecraft.entity.effect.StatusEffectCategory;
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
import net.minecraft.entity.effect.StatusEffects;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
|
||||||
public class MesotheliomaStatusEffect extends StatusEffect {
|
public class MesotheliomaStatusEffect extends StatusEffect {
|
||||||
public MesotheliomaStatusEffect() {
|
public MesotheliomaStatusEffect() {
|
||||||
super(StatusEffectType.HARMFUL, 0x302412);
|
super(StatusEffectCategory.HARMFUL, 0x302412);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -38,13 +38,17 @@ public class AsbestosRoofBlock extends CarcinogenicBlock {
|
||||||
Direction dir = state.get(Properties.HORIZONTAL_FACING);
|
Direction dir = state.get(Properties.HORIZONTAL_FACING);
|
||||||
switch (dir) {
|
switch (dir) {
|
||||||
case NORTH:
|
case NORTH:
|
||||||
return VoxelShapes.union(VoxelShapes.cuboid(0, 0, 0, 1, 0.5, 1), VoxelShapes.cuboid(1, 0.5, 1, 0, 1, 0.5));
|
return VoxelShapes.union(VoxelShapes.cuboid(0, 0, 0, 1, 0.5, 1),
|
||||||
|
VoxelShapes.cuboid(0, 0.5, 0.5, 1, 1, 1));
|
||||||
case SOUTH:
|
case SOUTH:
|
||||||
return VoxelShapes.union(VoxelShapes.cuboid(0, 0, 0, 1, 0.5, 1), VoxelShapes.cuboid(0, 0.5, 0, 1, 1, 0.5));
|
return VoxelShapes.union(VoxelShapes.cuboid(0, 0, 0, 1, 0.5, 1),
|
||||||
|
VoxelShapes.cuboid(0, 0.5, 0, 1, 1, 0.5));
|
||||||
case EAST:
|
case EAST:
|
||||||
return VoxelShapes.union(VoxelShapes.cuboid(0, 0, 0, 1, 0.5, 1), VoxelShapes.cuboid(0, 0.5, 0, 0.5, 1, 1));
|
return VoxelShapes.union(VoxelShapes.cuboid(0, 0, 0, 1, 0.5, 1),
|
||||||
|
VoxelShapes.cuboid(0, 0.5, 0, 0.5, 1, 1));
|
||||||
case WEST:
|
case WEST:
|
||||||
return VoxelShapes.union(VoxelShapes.cuboid(0, 0, 0, 1, 0.5, 1), VoxelShapes.cuboid(1, 0.5, 0, 0.5, 1, 1));
|
return VoxelShapes.union(VoxelShapes.cuboid(0, 0, 0, 1, 0.5, 1),
|
||||||
|
VoxelShapes.cuboid(0.5, 0.5, 0, 1, 1, 1));
|
||||||
default:
|
default:
|
||||||
return VoxelShapes.fullCube();
|
return VoxelShapes.fullCube();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ package dev.agatharose.asbestos.component;
|
||||||
import dev.agatharose.asbestos.Asbestos;
|
import dev.agatharose.asbestos.Asbestos;
|
||||||
import dev.onyxstudios.cca.api.v3.component.sync.AutoSyncedComponent;
|
import dev.onyxstudios.cca.api.v3.component.sync.AutoSyncedComponent;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.NbtCompound;
|
||||||
|
|
||||||
public class PlayerMesotheliomaComponent implements MesotheliomaComponent, AutoSyncedComponent {
|
public class PlayerMesotheliomaComponent implements MesotheliomaComponent, AutoSyncedComponent {
|
||||||
private PlayerEntity player;
|
private PlayerEntity player;
|
||||||
|
@ -26,12 +26,12 @@ public class PlayerMesotheliomaComponent implements MesotheliomaComponent, AutoS
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNbt(CompoundTag tag) {
|
public void readFromNbt(NbtCompound tag) {
|
||||||
this.mesothelioma = tag.getInt("mesothelioma");
|
this.mesothelioma = tag.getInt("mesothelioma");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNbt(CompoundTag tag) {
|
public void writeToNbt(NbtCompound tag) {
|
||||||
tag.putInt("mesothelioma", this.mesothelioma);
|
tag.putInt("mesothelioma", this.mesothelioma);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import static dev.agatharose.asbestos.AsbestosRegistry.*;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.MiningToolItem;
|
import net.minecraft.item.MiningToolItem;
|
||||||
import net.minecraft.item.ToolMaterial;
|
import net.minecraft.item.ToolMaterial;
|
||||||
|
import net.minecraft.tag.Tag;
|
||||||
|
|
||||||
public class ScraperItem extends MiningToolItem {
|
public class ScraperItem extends MiningToolItem {
|
||||||
|
|
||||||
|
@ -15,6 +16,6 @@ public class ScraperItem extends MiningToolItem {
|
||||||
Arrays.asList(ASBESTOS_BLOCK, POPCORN_CEILING_BLOCK, ASBESTOS_TILE_BLOCK));
|
Arrays.asList(ASBESTOS_BLOCK, POPCORN_CEILING_BLOCK, ASBESTOS_TILE_BLOCK));
|
||||||
|
|
||||||
public ScraperItem(ToolMaterial material, float attackDamage, float attackSpeed, Settings settings) {
|
public ScraperItem(ToolMaterial material, float attackDamage, float attackSpeed, Settings settings) {
|
||||||
super(attackDamage, attackSpeed, material, affectedBlocks, settings);
|
super(attackDamage, attackSpeed, material, Tag.of(affectedBlocks), settings);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -31,9 +31,10 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.7.4",
|
"fabricloader": ">=0.11.3",
|
||||||
"fabric": "*",
|
"fabric": "*",
|
||||||
"minecraft": "1.16.x"
|
"minecraft": "1.17.x",
|
||||||
|
"java": ">=16"
|
||||||
},
|
},
|
||||||
"suggests": {
|
"suggests": {
|
||||||
"modmenu": "*"
|
"modmenu": "*"
|
||||||
|
|
Loading…
Reference in New Issue