Skip to content
This repository was archived by the owner on Sep 12, 2025. It is now read-only.

Commit f4c0b4f

Browse files
committed
minor code cleanup
1 parent eba1823 commit f4c0b4f

File tree

27 files changed

+47
-109
lines changed

27 files changed

+47
-109
lines changed

.idea/workspace.xml

Lines changed: 37 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ _In alphabetical order_
3838

3939
- [BlayTheNinth for Balm](https://github.com/TwelveIterationMods/Balm)
4040
- [jaredlll08 for MultiLoader-Template](https://github.com/jaredlll08/MultiLoader-Template)
41+
- [McJty for RFTools Dimensions](https://github.com/McJtyMods/RFToolsDimensions)
4142
- [shedaniel for Cloth Config](https://github.com/shedaniel/cloth-config)
4243
- [Sunekaer for Yeetus Experimentus](https://github.com/nanite/Yeetus-Experimentus)
4344

changelogs/20.1.0-alpha7.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
### 20.1.0-alpha7
2+
_Admin powers_

common/src/main/java/dev/detpikachu/buildersvoid/ModCommon.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
import net.blay09.mods.balm.api.Balm;
66

77
public class ModCommon {
8-
98
public static void initialize() {
10-
119
ModConfig.initialize(Balm.getConfig());
1210
ModNetwork.initialize(Balm.getNetworking());
1311
ModItems.initialize(Balm.getItems());

common/src/main/java/dev/detpikachu/buildersvoid/ModConfig.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,17 @@
99

1010
@Config(value = ModConstants.MOD_ID)
1111
public class ModConfig implements BalmConfigData {
12-
1312
@Comment("Enables a cooldown when using any of the Void Pearl variants")
1413
public boolean enableCooldown = true;
1514

1615
@Comment("Void Pearl usage cooldown length, in ticks")
1716
public int cooldown = 100;
1817

1918
public static void initialize(BalmConfig config) {
20-
2119
config.registerConfig(ModConfig.class, ClientConfigMessage::new);
2220
}
2321

2422
public static ModConfig getActive() {
25-
2623
return Balm.getConfig().getActive(ModConfig.class);
2724
}
2825
}

common/src/main/java/dev/detpikachu/buildersvoid/ModConstants.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@
55
import org.slf4j.LoggerFactory;
66

77
public class ModConstants {
8-
9-
public static final String MOD_ID = "buildersvoid";
10-
public static final Logger LOG = LoggerFactory.getLogger(MOD_ID);
8+
public static final String MOD_ID = "buildersvoid";
9+
public static final Logger LOG = LoggerFactory.getLogger(MOD_ID);
1110

1211
public static final int VOID_HEIGHT = 50;
1312
public static final int VOID_SPACING = 10000;
1413

1514
public static ResourceLocation id(String path) {
16-
1715
return new ResourceLocation(MOD_ID, path);
1816
}
1917
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package dev.detpikachu.buildersvoid.client;
22

33
public class ModCommonClient {
4-
54
public static void initialize() {
65
}
76
}

common/src/main/java/dev/detpikachu/buildersvoid/item/LinkedVoidPearl.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,15 @@
1313
import java.util.List;
1414

1515
public class LinkedVoidPearl extends VoidPearl {
16-
1716
public LinkedVoidPearl(Properties properties) {
1817
super(properties);
1918
}
2019

2120
@Override
2221
public void appendHoverText(ItemStack stack, @Nullable Level level, List<Component> tooltipComponents, TooltipFlag isAdvanced) {
23-
2422
CompoundTag tag = stack.getTag();
25-
if (tag == null || !tag.contains("UUID")) {
2623

24+
if (tag == null || !tag.contains("UUID")) {
2725
tooltipComponents.add(Component.translatable("tooltip.buildersvoid.linked_void_pearl.usage.unbound"));
2826
return;
2927
}
@@ -34,10 +32,9 @@ public void appendHoverText(ItemStack stack, @Nullable Level level, List<Compone
3432

3533
@Override
3634
public boolean isFoil(ItemStack stack) {
37-
3835
CompoundTag tag = stack.getTag();
39-
if (tag == null) {
4036

37+
if (tag == null) {
4138
return false;
4239
}
4340

@@ -46,21 +43,17 @@ public boolean isFoil(ItemStack stack) {
4643

4744
@Override
4845
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand usedHand) {
49-
5046
ItemStack itemStack = player.getItemInHand(usedHand);
5147
CompoundTag tag = itemStack.getTag();
5248

5349
if (player.isCrouching()) {
5450
// If the player is crouching, we're attempting to bind the Linked Void Pearl to them
55-
5651
if (level.isClientSide) {
57-
5852
return InteractionResultHolder.pass(itemStack);
5953
}
6054

6155
if (tag != null && tag.contains("UUID")) {
6256
// If it's already bound, do nothing
63-
6457
return InteractionResultHolder.pass(itemStack);
6558
}
6659

@@ -76,7 +69,7 @@ public InteractionResultHolder<ItemStack> use(Level level, Player player, Intera
7669
if (tag == null || !tag.contains("UUID")) {
7770
return InteractionResultHolder.pass(itemStack);
7871
}
79-
72+
8073
return super.use(level, player, usedHand);
8174
}
8275
}

common/src/main/java/dev/detpikachu/buildersvoid/item/ModItems.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,12 @@
1111
import static net.blay09.mods.balm.api.item.BalmItems.itemProperties;
1212

1313
public class ModItems {
14-
1514
public static DeferredObject<CreativeModeTab> TAB;
1615

1716
public static Item VOID_PEARL;
1817
public static Item LINKED_VOID_PEARL;
1918

2019
public static void initialize(BalmItems items) {
21-
2220
items.registerItem((identifier) -> VOID_PEARL = new VoidPearl(itemProperties(identifier)), id("void_pearl"));
2321
items.registerItem((identifier) -> LINKED_VOID_PEARL = new LinkedVoidPearl(itemProperties(identifier)), id("linked_void_pearl"));
2422

0 commit comments

Comments
 (0)