Compare commits
No commits in common. "1.18" and "mistress" have entirely different histories.
|
@ -31,4 +31,3 @@ bin/
|
|||
# fabric
|
||||
|
||||
run/
|
||||
remappedSrc/
|
38
build.gradle
38
build.gradle
|
@ -1,18 +1,18 @@
|
|||
plugins {
|
||||
id 'fabric-loom' version '0.10-SNAPSHOT'
|
||||
id 'fabric-loom' version '0.5-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version + "-" + project.minecraft_version
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url "https://maven.terraformersmc.com/releases/"
|
||||
url "http://maven.terraformersmc.com/releases/"
|
||||
}
|
||||
maven {
|
||||
name = 'Ladysnake Mods'
|
||||
|
@ -70,9 +70,8 @@ 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).configureEach {
|
||||
it.options.encoding = "UTF-8"
|
||||
it.options.release = 17
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
|
@ -85,4 +84,25 @@ 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()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,18 +3,18 @@ org.gradle.jvmargs=-Xmx1G
|
|||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/use
|
||||
minecraft_version=1.18.2
|
||||
yarn_mappings=1.18.2+build.2
|
||||
loader_version=0.13.3
|
||||
minecraft_version=1.16.5
|
||||
yarn_mappings=1.16.5+build.9
|
||||
loader_version=0.11.3
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.2.1
|
||||
mod_version = 1.1
|
||||
maven_group = dev.agatharose
|
||||
archives_base_name = asbestos
|
||||
|
||||
# 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.48.0+1.18.2
|
||||
modmenu_version=3.1.0
|
||||
cca_version=4.0.1
|
||||
cloth_version=6.2.57
|
||||
fabric_version=0.34.2+1.16
|
||||
modmenu_version=1.16.9
|
||||
cca_version=2.8.3
|
||||
cloth_version=4.11.26
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -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 dev.onyxstudios.cca.api.v3.entity.RespawnCopyStrategy;
|
||||
import nerdhub.cardinal.components.api.util.RespawnCopyStrategy;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.damage.DamageSource;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package dev.agatharose.asbestos;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import dev.agatharose.asbestos.block.AsbestosRoofBlock;
|
||||
import dev.agatharose.asbestos.block.CarcinogenicBlock;
|
||||
import dev.agatharose.asbestos.item.PpeArmorMaterial;
|
||||
|
@ -11,6 +9,7 @@ import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
|
|||
import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
|
@ -26,19 +25,15 @@ import net.minecraft.sound.BlockSoundGroup;
|
|||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.BuiltinRegistries;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.util.registry.RegistryEntry;
|
||||
import net.minecraft.util.registry.RegistryKey;
|
||||
import net.minecraft.world.gen.GenerationStep;
|
||||
import net.minecraft.world.gen.YOffset;
|
||||
import net.minecraft.world.gen.decorator.Decorator;
|
||||
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.OreConfiguredFeatures;
|
||||
import net.minecraft.world.gen.feature.OreFeatureConfig;
|
||||
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||
import net.minecraft.world.gen.placementmodifier.CountPlacementModifier;
|
||||
import net.minecraft.world.gen.placementmodifier.HeightRangePlacementModifier;
|
||||
import net.minecraft.world.gen.placementmodifier.SquarePlacementModifier;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class AsbestosRegistry {
|
||||
// block/item definitions
|
||||
public static final Item ASBESTOS_FIBERS = new Item(new FabricItemSettings().group(ItemGroup.MATERIALS)
|
||||
|
@ -51,10 +46,10 @@ public class AsbestosRegistry {
|
|||
FabricBlockSettings.of(Material.WOOL).hardness(1.0f).sounds(BlockSoundGroup.WOOL), 40);
|
||||
|
||||
public static final CarcinogenicBlock SERPENTINITE_BLOCK = new CarcinogenicBlock(FabricBlockSettings
|
||||
.of(Material.STONE).hardness(3.0f).requiresTool(), 20);
|
||||
.of(Material.STONE).hardness(3.0f).breakByTool(FabricToolTags.PICKAXES).requiresTool(), 20);
|
||||
|
||||
public static final CarcinogenicBlock POPCORN_CEILING_BLOCK = new CarcinogenicBlock(FabricBlockSettings
|
||||
.of(Material.WOOD).hardness(2.0f).sounds(BlockSoundGroup.WOOD),
|
||||
.of(Material.WOOD).hardness(2.0f).breakByTool(FabricToolTags.AXES).sounds(BlockSoundGroup.WOOD),
|
||||
20);
|
||||
|
||||
public static final CarcinogenicBlock ASBESTOS_TILE_BLOCK = new CarcinogenicBlock(
|
||||
|
@ -80,16 +75,12 @@ public class AsbestosRegistry {
|
|||
new Item.Settings().group(ItemGroup.COMBAT));
|
||||
|
||||
// serpentinite worldgen
|
||||
private static ConfiguredFeature<?, ?> SERPENTINITE_OVERWORLD = new ConfiguredFeature<OreFeatureConfig, Feature<OreFeatureConfig>>(
|
||||
Feature.ORE, new OreFeatureConfig(OreConfiguredFeatures.DEEPSLATE_ORE_REPLACEABLES,
|
||||
SERPENTINITE_BLOCK.getDefaultState(), 5));
|
||||
|
||||
public static PlacedFeature SERPENTINITE_PLACED_FEATURE = new PlacedFeature(
|
||||
RegistryEntry.of(SERPENTINITE_OVERWORLD),
|
||||
Arrays.asList(
|
||||
CountPlacementModifier.of(20),
|
||||
SquarePlacementModifier.of(),
|
||||
HeightRangePlacementModifier.uniform(YOffset.getBottom(), YOffset.fixed(0))));
|
||||
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);
|
||||
|
||||
public static void register() {
|
||||
// asbestos fibers item
|
||||
|
@ -125,13 +116,12 @@ public class AsbestosRegistry {
|
|||
ASBESTOS_ROOF_BLOCK, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS)));
|
||||
|
||||
// serpentinite worldgen
|
||||
RegistryKey<PlacedFeature> serpentiniteOverworld = RegistryKey.of(
|
||||
Registry.PLACED_FEATURE_KEY, new Identifier("asbestos", "serpentinite_overworld"));
|
||||
RegistryKey<ConfiguredFeature<?, ?>> serpentiniteOverworld = RegistryKey.of(
|
||||
Registry.CONFIGURED_FEATURE_WORLDGEN,
|
||||
new Identifier("asbestos", "serpentinite_overworld"));
|
||||
|
||||
Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, serpentiniteOverworld.getValue(),
|
||||
SERPENTINITE_OVERWORLD);
|
||||
Registry.register(BuiltinRegistries.PLACED_FEATURE, serpentiniteOverworld.getValue(),
|
||||
SERPENTINITE_PLACED_FEATURE);
|
||||
BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(),
|
||||
GenerationStep.Feature.UNDERGROUND_ORES, serpentiniteOverworld);
|
||||
|
||||
|
|
|
@ -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.StatusEffectCategory;
|
||||
import net.minecraft.entity.effect.StatusEffectType;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
||||
public class MesotheliomaStatusEffect extends StatusEffect {
|
||||
public MesotheliomaStatusEffect() {
|
||||
super(StatusEffectCategory.HARMFUL, 0x302412);
|
||||
super(StatusEffectType.HARMFUL, 0x302412);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -37,20 +37,16 @@ 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(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();
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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.NbtCompound;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
||||
public class PlayerMesotheliomaComponent implements MesotheliomaComponent, AutoSyncedComponent {
|
||||
private PlayerEntity player;
|
||||
|
@ -26,12 +26,12 @@ public class PlayerMesotheliomaComponent implements MesotheliomaComponent, AutoS
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNbt(NbtCompound tag) {
|
||||
public void readFromNbt(CompoundTag tag) {
|
||||
this.mesothelioma = tag.getInt("mesothelioma");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNbt(NbtCompound tag) {
|
||||
public void writeToNbt(CompoundTag tag) {
|
||||
tag.putInt("mesothelioma", this.mesothelioma);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package dev.agatharose.asbestos.config;
|
||||
|
||||
import me.shedaniel.autoconfig.ConfigData;
|
||||
import me.shedaniel.autoconfig.annotation.Config;
|
||||
import me.shedaniel.autoconfig.annotation.*;
|
||||
|
||||
@Config(name = "asbestos")
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
package dev.agatharose.asbestos.item;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
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.TagKey;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
public class ScraperItem extends MiningToolItem {
|
||||
private static TagKey<Block> affectedBlocks = TagKey.of(Registry.BLOCK_KEY, new Identifier("asbestos", "scrapable"));
|
||||
|
||||
private static Set<Block> affectedBlocks = new HashSet<Block>(
|
||||
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);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"block.asbestos.popcorn_ceiling_block": "Popcorn Ceiling",
|
||||
"block.asbestos.asbestos_tile_block": "Asbestos Tiles",
|
||||
"block.asbestos.asbestos_roof_block": "Asbestos Roof Tiles",
|
||||
"item.asbestos.asbestos_fibers": "Asbestos Fibers",
|
||||
"item.asbestos.asbestos_fibers": "Asbests Fibers",
|
||||
"item.asbestos.iron_scraper": "Asbestos Scraper",
|
||||
"item.asbestos.ppe_helmet": "Asbestos Removal PPE Helmet",
|
||||
"item.asbestos.ppe_chestplate": "Asbestos Removal PPE Chestplate",
|
||||
|
@ -21,4 +21,4 @@
|
|||
"text.autoconfig.asbestos.option.mesothelioma.period.@Tooltip[1]": "each check for asbestos around the player",
|
||||
"text.autoconfig.asbestos.option.mesothelioma.threshold": "Mesothelioma threshold",
|
||||
"text.autoconfig.asbestos.option.mesothelioma.threshold.@Tooltip": "How many mesothelioma points must the player have to die"
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"block.asbestos.asbestos_block": "Asbestblock",
|
||||
"block.asbestos.serpentinite_block": "Serpentinit",
|
||||
"block.asbestos.popcorn_ceiling_block": "Popcorntak",
|
||||
"block.asbestos.asbestos_tile_block": "Asbestrutor",
|
||||
"block.asbestos.asbestos_roof_block": "Asbesttakrutor",
|
||||
"item.asbestos.asbestos_fibers": "Asbestfiber",
|
||||
"item.asbestos.iron_scraper": "Asbestskrapa",
|
||||
"item.asbestos.ppe_helmet": "Asbestborttagningsskyddshj\u00e4lm",
|
||||
"item.asbestos.ppe_chestplate": "Asbestborttagningsskyddsv\u00e4st",
|
||||
"item.asbestos.ppe_leggings": "Asbestborttagningsskyddsbyxor",
|
||||
"item.asbestos.ppe_boots": "Asbestborttagningsskyddsst\u00f6vlar",
|
||||
"effect.asbestos.mesothelioma": "Mesoteliom",
|
||||
"death.attack.mesotheliomaDamage": "%1$s fick r\u00e4tt till finansiell kompensation",
|
||||
"text.autoconfig.asbestos.title": "Asbestborttagning",
|
||||
"text.autoconfig.asbestos.option.mesothelioma": "Mesoteliominst\u00e4llningar",
|
||||
"text.autoconfig.asbestos.option.mesothelioma.offset": "Avst\u00e5nd (block)",
|
||||
"text.autoconfig.asbestos.option.mesothelioma.offset.@Tooltip": "Hur m\u00e5nga block runt spelaren som kollas",
|
||||
"text.autoconfig.asbestos.option.mesothelioma.period": "Period (sekunder)",
|
||||
"text.autoconfig.asbestos.option.mesothelioma.period.@Tooltip[0]": "Hur m\u00e5nga sekunder som ska g\u00e5 mellan",
|
||||
"text.autoconfig.asbestos.option.mesothelioma.period.@Tooltip[1]": "varje koll efter asbest runt spelaren",
|
||||
"text.autoconfig.asbestos.option.mesothelioma.threshold": "Mesoteliomtr\u00f6skelv\u00e4rde",
|
||||
"text.autoconfig.asbestos.option.mesothelioma.threshold.@Tooltip": "Hur m\u00e5nga mesoteliom-\"po\u00e4ng\" spelaren beh\u00f6ver f\u00e6r att d\u00e6"
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"asbestos:asbestos_block",
|
||||
"asbestos:popcorn_ceiling_block",
|
||||
"asbestos:asbestos_tile_block"
|
||||
]
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"asbestos:popcorn_ceiling_block"
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"asbestos:serpentinite_block",
|
||||
"asbestos:asbestos_roof_block"
|
||||
]
|
||||
}
|
|
@ -31,10 +31,9 @@
|
|||
]
|
||||
},
|
||||
"depends": {
|
||||
"fabricloader": ">=0.12.0",
|
||||
"fabricloader": ">=0.7.4",
|
||||
"fabric": "*",
|
||||
"minecraft": "1.18.x",
|
||||
"java": ">=17"
|
||||
"minecraft": "1.16.x"
|
||||
},
|
||||
"suggests": {
|
||||
"modmenu": "*"
|
||||
|
|
Loading…
Reference in New Issue