Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
PinkGoosik committed Mar 11, 2024
1 parent 0661981 commit 8912e32
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 160 deletions.
14 changes: 10 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,16 @@ loom {
}

processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
def expandProps = [
"version": rootProject.mod_version,
"minecraft_version_range": rootProject.minecraft_version_range,
]

filesMatching(["fabric.mod.json"]) {
expand expandProps
}

inputs.properties(expandProps)
}

tasks.withType(JavaCompile).configureEach {
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ mod_version = 0.6.0+1.20
maven_group = ru.pinkgoosik
archives_base_name = artifality

minecraft_version_range = >=1.20 <1.20.2

# Dependencies
minecraft_version = 1.20.1
yarn_mappings = 1.20.1+build.10
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/artifality/block/CrateBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import static artifality.registry.ArtifalityItems.*;

import artifality.block.base.BaseBlock;
import artifality.extension.ArtifactChances;
import artifality.item.base.ArtifactItem;
import artifality.list.ArtifactRarity;
import artifality.registry.ArtifalityItems;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
Expand Down
13 changes: 0 additions & 13 deletions src/main/java/artifality/extension/ArtifactChances.java

This file was deleted.

7 changes: 0 additions & 7 deletions src/main/java/artifality/item/ArtifactSettings.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package artifality.item;

import artifality.list.ArtifactRarity;
import dev.emi.trinkets.api.client.TrinketRenderer;
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;

public class ArtifactSettings {
public final FabricItemSettings fabricItemSettings;
public ArtifactRarity rarity = ArtifactRarity.COMMON;
public TrinketRenderer renderer;
public boolean isCrateLoot = true;
public boolean isTrinket = false;
Expand All @@ -19,11 +17,6 @@ public ArtifactSettings() {
fabricItemSettings = new FabricItemSettings();
}

public ArtifactSettings rarity(ArtifactRarity rarity) {
this.rarity = rarity;
return this;
}

public ArtifactSettings nonCrateItem() {
this.isCrateLoot = false;
return this;
Expand Down
26 changes: 0 additions & 26 deletions src/main/java/artifality/list/ArtifactRarity.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package artifality.mixin.common.extension;
package artifality.mixin.common;

import artifality.extension.LightningExtension;
import net.minecraft.entity.Entity;
Expand All @@ -11,13 +11,13 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(LightningEntity.class)
public abstract class LightningMixinExtension extends Entity implements LightningExtension {
public abstract class LightningMixin extends Entity implements LightningExtension {

private boolean artifality$canSpawnFire = true;
private boolean artifality$canChargeCreeper = true;
private float artifality$damage = 0;

public LightningMixinExtension(EntityType<?> type, World world) {
public LightningMixin(EntityType<?> type, World world) {
super(type, world);
}

Expand Down

This file was deleted.

22 changes: 7 additions & 15 deletions src/main/java/artifality/registry/ArtifactConfigs.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,39 @@

import artifality.client.render.BalloonRenderer;
import artifality.item.ArtifactSettings;
import artifality.list.ArtifactRarity;

public class ArtifactConfigs {

public static final ArtifactSettings LUNAR_CRYSTAL_WAND = new ArtifactSettings()
.maxCount(1)
.tiered()
.rarity(ArtifactRarity.RARE);
.tiered();

public static final ArtifactSettings NATURE_STAFF = new ArtifactSettings()
.maxCount(1)
.tiered()
.rarity(ArtifactRarity.COMMON);
.tiered();

public static final ArtifactSettings ZEUS_STAFF = new ArtifactSettings()
.maxCount(1)
.tiered()
.rarity(ArtifactRarity.LEGENDARY);
.tiered();

public static final ArtifactSettings INVISIBILITY_CAPE = new ArtifactSettings()
.maxCount(1)
.trinket()
.tiered()
.rarity(ArtifactRarity.COMMON);
.tiered();

public static final ArtifactSettings BALLOON = new ArtifactSettings()
.maxDamage(128)
.tiered()
.trinket()
.twoModeled()
.renderer(new BalloonRenderer())
.rarity(ArtifactRarity.RARE);
.renderer(new BalloonRenderer());

public static final ArtifactSettings HAND_FAN = new ArtifactSettings()
.maxCount(1)
.tiered()
.rarity(ArtifactRarity.RARE);
.tiered();

public static final ArtifactSettings HAUNTING_SOUL = new ArtifactSettings()
.maxCount(1)
.tiered()
.trinket()
.rarity(ArtifactRarity.RARE);
.trinket();
}
2 changes: 1 addition & 1 deletion src/main/java/artifality/util/TooltipAppender.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ else if(item instanceof EnchantedBookItem) {

private static boolean shiftPressed(List<Text> tooltip, Item item) {
if(!Screen.hasShiftDown()) {
if(!(item instanceof EnchantedBookItem && FabricLoader.getInstance().isModLoaded("enchdesc"))) {
if(!(item instanceof EnchantedBookItem && (FabricLoader.getInstance().isModLoaded("enchdesc") || FabricLoader.getInstance().isModLoaded("idwtialsimmoedm")))) {
tooltip.add(Text.literal(""));
tooltip.add(Text.literal(ofKey("press_shift")).formatted(Formatting.GRAY));
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/artifality.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"common.TrackTargetGoalMixin",
"common.VillagerMixin",
"common.access.BeaconAccess",
"common.extension.LightningMixinExtension",
"common.LightningMixin",
"common.extension.PlayerMixinExtension"
],
"client": [
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"depends": {
"fabricloader": "*",
"fabric-api": "*",
"minecraft": ">=1.20 <1.20.2",
"minecraft": "${minecraft_version_range}",
"java": ">=17",
"trinkets": "*"
}
Expand Down

0 comments on commit 8912e32

Please sign in to comment.