Skip to content

Commit

Permalink
initial alabli
Browse files Browse the repository at this point in the history
  • Loading branch information
unix-supremacist committed Dec 8, 2023
1 parent 3fc67c7 commit 60c8a9c
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 42 deletions.
15 changes: 6 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ repositories {
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/"
}
mavenLocal()
}

loom {
Expand Down Expand Up @@ -77,14 +78,14 @@ sourceSets {
dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings loom.layered() {
officialMojangMappings()
//parchment("org.parchmentmc.data:parchment-1.20.1:2023.06.26@zip")
}
mappings loom.officialMojangMappings()
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation ("io.github.unix-supremacist:alabli:1.0.0"){
transitive = false
}
modImplementation "TechReborn:TechReborn-1.20:5.9.1"
include(implementation(annotationProcessor("io.github.llamalad7:mixinextras-fabric:0.2.0-rc.4")))
//include(implementation(annotationProcessor("io.github.llamalad7:mixinextras-fabric:0.2.0-rc.4")))
include modImplementation("net.feltmc:felt-splash-api:1.0.0-1.20.1"){
exclude(group: "com.terraformersmc")
}
Expand All @@ -101,11 +102,7 @@ dependencies {
modRuntimeOnly "dev.onyxstudios.cardinal-components-api:cardinal-components-entity:5.3.0"
modImplementation "dev.emi:trinkets:3.8.0"
modRuntimeOnly "maven.modrinth:jei:16.0.0.28"
//modRuntimeOnly "maven.modrinth:architectury-api:10.0.7+fabric"
//modRuntimeOnly "maven.modrinth:cloth-config:12.0.107+fabric"
//modRuntimeOnly "maven.modrinth:rei:13.0.654+fabric"
modRuntimeOnly "maven.modrinth:modernfix:${project.modernfix_version}"
//modRuntimeOnly "maven.modrinth:ferrite-core:6.0.0-fabric"
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ org.gradle.parallel=true
# check these on https://fabricmc.net/develop
minecraft_version=1.20.2
yarn_mappings=1.20.2+build.1
loader_version=0.14.22
loader_version=0.15.0

# Mod Properties
mod_version=1.1.0
modid=alchemist
maven_group=com.example
maven_group=io.github.unix-supremacist
archives_base_name=alchemist

# Dependencies
Expand Down
16 changes: 2 additions & 14 deletions src/main/java/io/github/unix_supremacist/Alchemist.java
Original file line number Diff line number Diff line change
@@ -1,39 +1,27 @@
package io.github.unix_supremacist;

import io.github.unix_supremacist.alabli.Alabli;
import io.github.unix_supremacist.content.AlchemistBlocks;
import io.github.unix_supremacist.content.AlchemistItems;
import io.github.unix_supremacist.content.AlchemistSplashes;
import io.github.unix_supremacist.data.BlockTag;
import io.github.unix_supremacist.item.AbstractEmpowerableItem;
import net.fabricmc.fabric.api.event.lifecycle.v1.CommonLifecycleEvents;
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.ItemStack;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Alchemist {
public static final String MODID = "alchemist";
public static final Logger LOGGER = LoggerFactory.getLogger(MODID);
public static final ResourceLocation empower_packet = new ResourceLocation(Alchemist.MODID, "empower_packet");
public static final CreativeModeTab tab = FabricItemGroup.builder()
.icon(() -> new ItemStack(AlchemistItems.philosophers_stone.getItem()))
.title(Component.translatable("itemGroup."+MODID))
.build();



public static void Init(){
LOGGER.info("Welcome to the World of Alchemy!");
Registry.register(BuiltInRegistries.CREATIVE_MODE_TAB, new ResourceLocation(MODID, "tab"), tab);
AlchemistSplashes.init();
AlchemistBlocks.values(); //force the enum to load
AlchemistItems.values(); //force the enum to load
Alabli.initializeCreativeTab();
CommonLifecycleEvents.TAGS_LOADED.register((registries, client) -> {
BlockTag.init();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package io.github.unix_supremacist.content;

import io.github.unix_supremacist.Alchemist;
import io.github.unix_supremacist.alabli.Alabli;
import io.github.unix_supremacist.item.*;
import lombok.Getter;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.fabricmc.fabric.api.registry.FuelRegistry;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Item.Properties;
Expand Down Expand Up @@ -66,8 +65,6 @@ public enum AlchemistItems {
this.item = item;
FuelRegistry.INSTANCE.add(item, burntime);
Registry.register(BuiltInRegistries.ITEM, new ResourceLocation(Alchemist.MODID, this.name()), item);
ItemGroupEvents.modifyEntriesEvent(ResourceKey.create(BuiltInRegistries.CREATIVE_MODE_TAB.key(), new ResourceLocation(Alchemist.MODID, "tab"))).register(content -> {
content.accept(item);
});
Alabli.items.add(item);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.unix_supremacist.interfaces;

import io.github.unix_supremacist.Alchemist;
import io.github.unix_supremacist.alabli.Alabli;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;

Expand Down Expand Up @@ -32,7 +32,7 @@ default ArrayList<BlockPos> getAreaFromFacing(Direction dir, BlockPos anchor, in
case DOWN:
return getArea(dir, anchor, new BlockPos(-size, 0, -size), new BlockPos(size, depth, size));
default:
Alchemist.LOGGER.error("HOW DID YOU CLICK A DIRECTION THAT ISN'T NORTH SOUTH EAST WEST UP OR DOWN");
Alabli.LOGGER.error("HOW DID YOU CLICK A DIRECTION THAT ISN'T NORTH SOUTH EAST WEST UP OR DOWN");
return null;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.github.unix_supremacist.item;

import io.github.unix_supremacist.alabli.AlabliItem;
import io.github.unix_supremacist.interfaces.DurablityBar;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Rarity;

public class AbstractEmpowerableItem extends Item implements DurablityBar {
public class AbstractEmpowerableItem extends AlabliItem implements DurablityBar {
protected final int maxPower;
public AbstractEmpowerableItem(Properties properties, int maxPower) {
super(properties);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package io.github.unix_supremacist.item;

import io.github.unix_supremacist.alabli.AlabliBlockItem;
import io.github.unix_supremacist.interfaces.DurablityBar;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Rarity;
import net.minecraft.world.item.context.BlockPlaceContext;
Expand All @@ -13,7 +13,7 @@

import static io.github.unix_supremacist.content.AlchemistItems.chalk;

public class AlchemistBlockItem extends BlockItem implements DurablityBar {
public class AlchemistBlockItem extends AlabliBlockItem implements DurablityBar {
public AlchemistBlockItem(Block block, Properties properties) {
super(block, properties);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.github.unix_supremacist.item;

import io.github.unix_supremacist.alabli.AlabliDiggerItem;
import io.github.unix_supremacist.interfaces.AreaBox;
import io.github.unix_supremacist.interfaces.Destroyer;
import io.github.unix_supremacist.interfaces.DurablityBar;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.tags.TagKey;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.DiggerItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Rarity;
import net.minecraft.world.item.Tier;
Expand All @@ -18,7 +18,7 @@

import java.util.ArrayList;

public class AlchemistDiggerItem extends DiggerItem implements AreaBox, Destroyer, DurablityBar {
public class AlchemistDiggerItem extends AlabliDiggerItem implements AreaBox, Destroyer, DurablityBar {
public AlchemistDiggerItem(float f, float g, Tier tier, TagKey<Block> tagKey, Properties properties) {
super(f, g, tier, tagKey, properties);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/github/unix_supremacist/item/GaleItem.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package io.github.unix_supremacist.item;

import dev.emi.trinkets.api.SlotReference;
import dev.emi.trinkets.api.TrinketItem;
import io.github.ladysnake.pal.AbilitySource;
import io.github.ladysnake.pal.Pal;
import io.github.ladysnake.pal.VanillaAbilities;
import io.github.unix_supremacist.Alchemist;
import io.github.unix_supremacist.alabli.AlabliTrinketItem;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Rarity;

public class GaleItem extends TrinketItem {
public class GaleItem extends AlabliTrinketItem {
public GaleItem(Properties properties) {
super(properties);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"contact": {
"homepage": "https://unix-supremacist.github.io",
"sources": "https://github.com/unix-supremacist/alchemist"
"sources": "https://github.com/Refabricated-Mods/alchemist"
},
"license": "OSL-3.0",
"icon": "assets/alchemist/icon.png",
Expand All @@ -30,7 +30,7 @@
},
"depends": {
"fabricloader": ">=0.15.0",
"minecraft": ">=1.20",
"minecraft": ">=1.18",
"java": ">=17",
"fabric-api": "*",
"trinkets": "*",
Expand Down

0 comments on commit 60c8a9c

Please sign in to comment.