Skip to content

Commit 930e962

Browse files
Bugfixes
+ Obsidian cutting kit now also works on crying obsidian * Fixed broken fertile soil entry in guidebook * Fixed improper modname capitalization
1 parent b212422 commit 930e962

8 files changed

Lines changed: 24 additions & 27 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ loader_version_range=[4,)
3030
# Must match the String constant located in the main mod class annotated with @Mod.
3131
mod_id=essentials
3232
# The human-readable display name for the mod.
33-
mod_name= Essentials
33+
mod_name=Essentials
3434
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
3535
mod_license=MIT
3636
# The mod version. See https://semver.org/

src/main/java/com/Da_Technomancer/essentials/ESEventHandlerClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
public class ESEventHandlerClient{
4040

41-
@EventBusSubscriber(bus = EventBusSubscriber.Bus.MOD, modid = Essentials.MODID, value = Dist.CLIENT)
41+
@EventBusSubscriber(modid = Essentials.MODID, value = Dist.CLIENT)
4242
public static class ESModEventsClient{
4343

4444
@SubscribeEvent

src/main/java/com/Da_Technomancer/essentials/ESEventHandlerCommon.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
public class ESEventHandlerCommon{
4848

49-
@EventBusSubscriber(bus = EventBusSubscriber.Bus.MOD, modid = Essentials.MODID)
49+
@EventBusSubscriber(modid = Essentials.MODID)
5050
public static class ESModEventsCommon{
5151

5252
@SuppressWarnings("unused")

src/main/java/com/Da_Technomancer/essentials/items/ESItems.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.Da_Technomancer.essentials.api.LinkHelper;
55
import com.Da_Technomancer.essentials.integration.ESIntegration;
66
import net.minecraft.core.component.DataComponentType;
7+
import net.minecraft.core.registries.Registries;
78
import net.minecraft.resources.ResourceLocation;
89
import net.minecraft.world.item.CreativeModeTab;
910
import net.minecraft.world.item.Item;
@@ -22,7 +23,7 @@ public class ESItems{
2223

2324
public static CreativeModeTab ESSENTIALS_TAB;
2425

25-
public static final DeferredRegister.DataComponents DATA_COMPONENTS = DeferredRegister.DataComponents.createDataComponents(Essentials.MODID);
26+
public static final DeferredRegister.DataComponents DATA_COMPONENTS = DeferredRegister.DataComponents.createDataComponents(Registries.DATA_COMPONENT_TYPE, Essentials.MODID);
2627

2728
public static final DeferredHolder<DataComponentType<?>, DataComponentType<LinkHelper.LinkedPosition>> LINKING_POS_DATA = DATA_COMPONENTS.registerComponentType("linking_pos", builder -> builder.persistent(LinkHelper.LinkedPosition.CODEC).networkSynchronized(LinkHelper.LinkedPosition.STREAM_CODEC));
2829
public static final DeferredHolder<DataComponentType<?>, DataComponentType<CircuitWrench.Selection>> WRENCH_SELECTION_DATA = DATA_COMPONENTS.registerComponentType("wrench_selection", builder -> builder.persistent(CircuitWrench.Selection.CODEC).networkSynchronized(CircuitWrench.Selection.STREAM_CODEC));

src/main/java/com/Da_Technomancer/essentials/items/ObsidianCuttingKit.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
package com.Da_Technomancer.essentials.items;
22

3+
import net.minecraft.core.registries.Registries;
34
import net.minecraft.network.chat.Component;
5+
import net.minecraft.resources.ResourceLocation;
6+
import net.minecraft.tags.TagKey;
47
import net.minecraft.world.InteractionResult;
58
import net.minecraft.world.item.Item;
69
import net.minecraft.world.item.ItemStack;
710
import net.minecraft.world.item.TooltipFlag;
811
import net.minecraft.world.item.context.UseOnContext;
9-
import net.minecraft.world.level.block.Blocks;
12+
import net.minecraft.world.level.block.Block;
1013

1114
import java.util.List;
1215

1316
public class ObsidianCuttingKit extends Item{
1417

18+
private static final TagKey<Block> OBSIDIAN_TAG = TagKey.create(Registries.BLOCK, ResourceLocation.fromNamespaceAndPath("c", "obsidians"));
19+
1520
protected ObsidianCuttingKit(){
1621
super(ESItems.baseItemProperties());
1722
String name = "obsidian_cutting_kit";
@@ -25,7 +30,7 @@ public void appendHoverText(ItemStack stack, TooltipContext context, List<Compon
2530

2631
@Override
2732
public InteractionResult useOn(UseOnContext context){
28-
if(context.getLevel().getBlockState(context.getClickedPos()).getBlock() == Blocks.OBSIDIAN){
33+
if(context.getLevel().getBlockState(context.getClickedPos()).is(OBSIDIAN_TAG)){
2934
if(!context.getLevel().isClientSide){
3035
context.getLevel().destroyBlock(context.getClickedPos(), true);
3136
if(context.getPlayer() == null || !context.getPlayer().isCreative()){

src/main/resources/META-INF/neoforge.mods.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ modId="${mod_id}" #mandatory
2626
version="${mod_version}" #mandatory
2727

2828
# A display name for the mod
29+
displayName="Essentials" #mandatory
2930
# A URL to query for updates for this mod. See the JSON update specification https://docs.neoforged.net/docs/misc/updatechecker/
3031
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional
3132

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,21 @@
11
{
2+
"name": "Fertile Soil",
23
"category": "essentials:essentials",
3-
"name": "{",
4-
"icon": " "format": 2,",
5-
"sortnum": 0,
6-
"priority": false,
7-
"read_by_default": "true",
4+
"icon": "essentials:fertile_soil",
5+
"read_by_default": true,
6+
"extra_recipe_mappings": {
7+
"essentials:fertile_soil": 0
8+
},
89
"pages": [
910
{
1011
"type": "patchouli:spotlight",
11-
"title": "{",
12-
"item": " "format": 2,",
13-
"text": " \"category\": \"essentials:essentials\",$(br2) \"icon\": \"essentials:fertile_soil\",$(br2) \"read_by_default\": true,$(br2) \"extra_recipe_mappings\": {$(br2)"
14-
},
15-
{
16-
"type": "patchouli:text",
17-
"text": " \"essentials:fertile_soil\": 0$(br2) },$(br2) \"pages\": [$(br2) {$(br2) \"type\": \"patchouli:spotlight\",$(br2) \"title\": \"Fertile Soil\",$(br2) \"item\": "
12+
"title": "Fertile Soil",
13+
"item": "essentials:circuit_wrench",
14+
"text": "<item>Fertile Soil/$ is an aid to farming. Plants (crops, saplings, etc.) can be planted on <item>Fertile Soil/$ like it was farmland, and they grow as if on hydrated farmland even without water. They also cannot be trampled.\n\nAt random intervals, the plant on top of the soil will spread to adjacent soil (both to more "
1815
},
1916
{
2017
"type": "patchouli:text",
21-
"text": "\"essentials:circuit_wrench\",$(br2) \"text\": \"<item>Fertile Soil/$ is an aid to farming. Plants (crops, saplings, etc.) can be planted on <item>Fertile Soil/$ like it was farmland, and they grow as if on hydrated farmland even without water. They also cannot be trampled.\n\nAt random intervals, the plant on top of the soil will spread to adjacent soil (both "
22-
},
23-
{
24-
"type": "patchouli:text",
25-
"text": "to more <item>Fertile Soil/$ and to regular soil), saving the trouble of replanting and enabling the automation of farming without villagers, as long as you leave at least one plant unharvested.\"$(br2) }$(br2) ]$(br2)}$(br2)"
18+
"text": "<item>Fertile Soil/$ and to regular soil), saving the trouble of replanting and enabling the automation of farming without villagers, as long as you leave at least one plant unharvested."
2619
}
27-
],
28-
"extra_recipe_mappings": {
29-
""name": "Fertile Soil"" : 0
30-
}
20+
]
3121
}

src/main/resources/python/docs/src/en_us/entries/essentials/fertile_soil.txt renamed to src/main/resources/python/docs/src/en_us/entries/essentials/fertile_soil.json

File renamed without changes.

0 commit comments

Comments
 (0)