Update to 1.17.x

This commit is contained in:
Agatha Lovelace 2021-09-08 22:02:02 +03:00
parent 93b50958a0
commit fdbe730ca6
No known key found for this signature in database
GPG Key ID: 2DB18BA2E0A80BC3
10 changed files with 48 additions and 61 deletions

View File

@ -1,18 +1,18 @@
plugins {
id 'fabric-loom' version '0.5-SNAPSHOT'
id 'fabric-loom' version '0.9-SNAPSHOT'
id 'maven-publish'
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
archivesBaseName = project.archives_base_name
version = project.mod_version
version = project.mod_version + "-" + project.minecraft_version
group = project.maven_group
repositories {
maven {
url "http://maven.terraformersmc.com/releases/"
url "https://maven.terraformersmc.com/releases/"
}
maven {
name = 'Ladysnake Mods'
@ -70,8 +70,9 @@ processResources {
// 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
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 16
}
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
@ -84,25 +85,4 @@ task sourcesJar(type: Jar, dependsOn: classes) {
jar {
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()
}
}
}

View File

@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.16.5
yarn_mappings=1.16.5+build.9
loader_version=0.11.3
minecraft_version=1.17.1
yarn_mappings=1.17.1+build.59
loader_version=0.11.6
# Mod Properties
mod_version = 1.1
@ -14,7 +14,7 @@ org.gradle.jvmargs=-Xmx1G
# Dependencies
# 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
modmenu_version=1.16.9
cca_version=2.8.3
cloth_version=4.11.26
fabric_version=0.40.0+1.17
modmenu_version=2.0.10
cca_version=3.1.1
cloth_version=5.0.38

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
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
zipStorePath=wrapper/dists

View File

@ -14,7 +14,7 @@ import dev.onyxstudios.cca.api.v3.entity.EntityComponentFactoryRegistry;
import dev.onyxstudios.cca.api.v3.entity.EntityComponentInitializer;
import me.shedaniel.autoconfig.AutoConfig;
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.minecraft.block.Block;
import net.minecraft.entity.damage.DamageSource;

View File

@ -27,11 +27,12 @@ import net.minecraft.util.registry.BuiltinRegistries;
import net.minecraft.util.registry.Registry;
import net.minecraft.util.registry.RegistryKey;
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.feature.ConfiguredFeature;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.OreFeatureConfig;
import net.minecraft.world.gen.heightprovider.UniformHeightProvider;
@SuppressWarnings("deprecation")
public class AsbestosRegistry {
@ -79,8 +80,9 @@ public class AsbestosRegistry {
private static ConfiguredFeature<?, ?> SERPENTINITE_OVERWORLD = Feature.ORE
.configure(new OreFeatureConfig(OreFeatureConfig.Rules.BASE_STONE_OVERWORLD,
SERPENTINITE_BLOCK.getDefaultState(), 5))
.decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(0, 0, 32))).spreadHorizontally()
.repeat(10);
.range(new RangeDecoratorConfig(
UniformHeightProvider.create(YOffset.aboveBottom(0), YOffset.fixed(32))))
.spreadHorizontally().repeat(10);
public static void register() {
// asbestos fibers item
@ -117,8 +119,7 @@ public class AsbestosRegistry {
// serpentinite worldgen
RegistryKey<ConfiguredFeature<?, ?>> serpentiniteOverworld = RegistryKey.of(
Registry.CONFIGURED_FEATURE_WORLDGEN,
new Identifier("asbestos", "serpentinite_overworld"));
Registry.CONFIGURED_FEATURE_KEY, new Identifier("asbestos", "serpentinite_overworld"));
Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, serpentiniteOverworld.getValue(),
SERPENTINITE_OVERWORLD);

View File

@ -5,13 +5,13 @@ import me.shedaniel.autoconfig.AutoConfig;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.effect.StatusEffect;
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.player.PlayerEntity;
public class MesotheliomaStatusEffect extends StatusEffect {
public MesotheliomaStatusEffect() {
super(StatusEffectType.HARMFUL, 0x302412);
super(StatusEffectCategory.HARMFUL, 0x302412);
}
@Override

View File

@ -37,16 +37,20 @@ public class AsbestosRoofBlock extends CarcinogenicBlock {
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext ctx) {
Direction dir = state.get(Properties.HORIZONTAL_FACING);
switch (dir) {
case NORTH:
return VoxelShapes.union(VoxelShapes.cuboid(0, 0, 0, 1, 0.5, 1), VoxelShapes.cuboid(1, 0.5, 1, 0, 1, 0.5));
case SOUTH:
return VoxelShapes.union(VoxelShapes.cuboid(0, 0, 0, 1, 0.5, 1), VoxelShapes.cuboid(0, 0.5, 0, 1, 1, 0.5));
case EAST:
return VoxelShapes.union(VoxelShapes.cuboid(0, 0, 0, 1, 0.5, 1), VoxelShapes.cuboid(0, 0.5, 0, 0.5, 1, 1));
case WEST:
return VoxelShapes.union(VoxelShapes.cuboid(0, 0, 0, 1, 0.5, 1), VoxelShapes.cuboid(1, 0.5, 0, 0.5, 1, 1));
default:
return VoxelShapes.fullCube();
case NORTH:
return VoxelShapes.union(VoxelShapes.cuboid(0, 0, 0, 1, 0.5, 1),
VoxelShapes.cuboid(0, 0.5, 0.5, 1, 1, 1));
case SOUTH:
return VoxelShapes.union(VoxelShapes.cuboid(0, 0, 0, 1, 0.5, 1),
VoxelShapes.cuboid(0, 0.5, 0, 1, 1, 0.5));
case EAST:
return VoxelShapes.union(VoxelShapes.cuboid(0, 0, 0, 1, 0.5, 1),
VoxelShapes.cuboid(0, 0.5, 0, 0.5, 1, 1));
case WEST:
return VoxelShapes.union(VoxelShapes.cuboid(0, 0, 0, 1, 0.5, 1),
VoxelShapes.cuboid(0.5, 0.5, 0, 1, 1, 1));
default:
return VoxelShapes.fullCube();
}
}

View File

@ -3,7 +3,7 @@ package dev.agatharose.asbestos.component;
import dev.agatharose.asbestos.Asbestos;
import dev.onyxstudios.cca.api.v3.component.sync.AutoSyncedComponent;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.NbtCompound;
public class PlayerMesotheliomaComponent implements MesotheliomaComponent, AutoSyncedComponent {
private PlayerEntity player;
@ -26,12 +26,12 @@ public class PlayerMesotheliomaComponent implements MesotheliomaComponent, AutoS
}
@Override
public void readFromNbt(CompoundTag tag) {
public void readFromNbt(NbtCompound tag) {
this.mesothelioma = tag.getInt("mesothelioma");
}
@Override
public void writeToNbt(CompoundTag tag) {
public void writeToNbt(NbtCompound tag) {
tag.putInt("mesothelioma", this.mesothelioma);
}
}

View File

@ -8,6 +8,7 @@ import static dev.agatharose.asbestos.AsbestosRegistry.*;
import net.minecraft.block.Block;
import net.minecraft.item.MiningToolItem;
import net.minecraft.item.ToolMaterial;
import net.minecraft.tag.Tag;
public class ScraperItem extends MiningToolItem {
@ -15,6 +16,6 @@ public class ScraperItem extends MiningToolItem {
Arrays.asList(ASBESTOS_BLOCK, POPCORN_CEILING_BLOCK, ASBESTOS_TILE_BLOCK));
public ScraperItem(ToolMaterial material, float attackDamage, float attackSpeed, Settings settings) {
super(attackDamage, attackSpeed, material, affectedBlocks, settings);
super(attackDamage, attackSpeed, material, Tag.of(affectedBlocks), settings);
}
}

View File

@ -31,9 +31,10 @@
]
},
"depends": {
"fabricloader": ">=0.7.4",
"fabricloader": ">=0.11.3",
"fabric": "*",
"minecraft": "1.16.x"
"minecraft": "1.17.x",
"java": ">=16"
},
"suggests": {
"modmenu": "*"