Skip to content

Commit

Permalink
Merge pull request #43 from JamCoreModding/feat/drop-baubly
Browse files Browse the repository at this point in the history
feat: remove baubly dep (big change)
  • Loading branch information
Jamalam360 authored May 20, 2024
2 parents cb352f5 + 5681a9c commit 1672177
Show file tree
Hide file tree
Showing 35 changed files with 382 additions and 653 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
- Fix item-loss when dropping an item from the belt.
- Remove the Baubly dependency
- Drop Forge and Quilt support (see Discord for reasoning). This was done pre-1.20.6 to reduce the
work needed to remove Baubly.
11 changes: 8 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.5-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
id "me.shedaniel.unified-publishing" version "0.1.+" apply false
id "com.github.breadmoirai.github-release" version "2.4.1"
}
Expand Down Expand Up @@ -70,14 +70,19 @@ allprojects {
}

maven {
name = "Terrarium Earth Maven"
url = "https://maven.resourcefulbees.com/repository/maven-public"
name = "TerraformersMC Maven"
url = "https://maven.terraformersmc.com"
}

maven {
name = "Cardinal Components Maven"
url = "https://maven.ladysnake.org/releases"
}

maven {
name = "TheIllusiveC4's Maven"
url = "https://maven.theillusivec4.top"
}
}

tasks.withType(JavaCompile) {
Expand Down
1 change: 0 additions & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ dependencies {
modImplementation libs.fabric.loader
modApi libs.architectury.common
modImplementation libs.jamlib.common
modImplementation libs.baubly.common
compileOnly libs.mixin.extras.common
annotationProcessor libs.mixin.extras.common
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static void setServerInstance(StateManager serverInstance) {

public boolean hasBelt(Player player) {
ItemStack belt = UtilityBeltItem.getBelt(player);
return belt != null && belt.is(UtilityBelt.UTILITY_BELT.get());
return belt != null && belt.is(UtilityBelt.UTILITY_BELT_ITEM.get());
}

public void onStartTick(Player player) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ public class UtilityBelt {
public static final ResourceLocation S2C_SET_BELT_SLOT = id("set_belt_slot");
public static final ResourceLocation S2C_SET_HOTBAR_SLOT = id("set_hotbar_slot");
private static final DeferredRegister<Item> ITEMS = DeferredRegister.create(MOD_ID, Registries.ITEM);
public static final RegistrySupplier<Item> UTILITY_BELT = ITEMS.register("utility_belt", UtilityBeltItem::new);
public static final RegistrySupplier<Item> UTILITY_BELT_ITEM = ITEMS.register("utility_belt", UtilityBeltItem::new);
public static final DeferredRegister<MenuType<?>> MENUS = DeferredRegister.create(MOD_ID, Registries.MENU);
public static final RegistrySupplier<MenuType<UtilityBeltMenu>> MENU_TYPE = MENUS.register("utility_belt", () -> new MenuType<>(UtilityBeltMenu::new, FeatureFlagSet.of()));

public static void init() {
JamLib.checkForJarRenaming(UtilityBelt.class);
ITEMS.register();
MENUS.register();
UTILITY_BELT.listen((belt) -> CreativeTabRegistry.append(CreativeModeTabs.TOOLS_AND_UTILITIES, UTILITY_BELT.get()));
UTILITY_BELT_ITEM.listen((belt) -> CreativeTabRegistry.append(CreativeModeTabs.TOOLS_AND_UTILITIES, belt));
ServerNetworking.init();
StateManager.setServerInstance(new ServerStateManager());
EnvExecutor.runInEnv(Env.CLIENT, () -> UtilityBeltClient::init);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public boolean equals(Object obj) {
return false;
}

@Override
public UtilityBeltInventory clone() {
UtilityBeltInventory inv = new UtilityBeltInventory();
for (int i = 0; i < this.getContainerSize(); i++) {
Expand Down
Loading

0 comments on commit 1672177

Please sign in to comment.