Initial Release code

This commit is contained in:
Justin Parsell 2021-10-27 23:31:08 -04:00
parent b44c9abf8e
commit b266c561f1
7 changed files with 9 additions and 9 deletions

View File

@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.11.3 loader_version=0.11.3
# Mod Properties # Mod Properties
mod_version = 0.0.1 mod_version = 1.0.0
maven_group = me.parsell maven_group = me.parsell
archives_base_name = glowstonewire archives_base_name = glowstonewire

View File

@ -5,6 +5,7 @@ import me.shedaniel.autoconfig.annotation.Config;
@Config(name = "GlowstoneWire") @Config(name = "GlowstoneWire")
public class GlowstoneWireConfig implements ConfigData{ public class GlowstoneWireConfig implements ConfigData{
public String Description = "Changing this does nothing. Replacing glowstone drops is dirty, and will overwrite ALL loot tables that attempt to change minecraft's glowstone loot table. Disable this, and cocnsider using a datapack to achieve what you want.";
public boolean addConversionRecipes = true; public boolean addConversionRecipes = true;
public boolean replaceGlowstoneDrop = true; public boolean replaceGlowstoneDrop = true;
} }

View File

@ -120,8 +120,6 @@ public class glowLootTables {
glowstonelootTable = new JsonObject(); glowstonelootTable = new JsonObject();
glowstonelootTable.addProperty("type", "minecraft:block"); glowstonelootTable.addProperty("type", "minecraft:block");
glowstonelootTable.add("pools", lootPoolsArray); glowstonelootTable.add("pools", lootPoolsArray);
System.out.println(glowstonelootTable.toString());
} }
} }
} }

View File

@ -27,6 +27,7 @@ public class glowRecipes {
BrewingRecipeRegistryInvoker.registerPotionRecipe(Potions.STRENGTH, glowItems.GLOWSTONE_DUST, Potions.STRONG_STRENGTH); BrewingRecipeRegistryInvoker.registerPotionRecipe(Potions.STRENGTH, glowItems.GLOWSTONE_DUST, Potions.STRONG_STRENGTH);
// Manually reset the glowstone compability, since i cant find a way to read and reset. // Manually reset the glowstone compability, since i cant find a way to read and reset.
Ingredient defaultFSFlickerModifier = FireworkStarRecipeAccessor.getFlickerModifier();
FireworkStarRecipeAccessor.setFlickerModifier(Ingredient.ofItems(Items.GLOWSTONE_DUST, glowItems.GLOWSTONE_DUST)); FireworkStarRecipeAccessor.setFlickerModifier(Ingredient.ofItems(Items.GLOWSTONE_DUST, glowItems.GLOWSTONE_DUST));
if(GlowstoneWire.CONFIG.addConversionRecipes) { if(GlowstoneWire.CONFIG.addConversionRecipes) {

View File

@ -21,7 +21,7 @@ public class LootManagerInjector {
@Inject(method = "apply", at = @At("HEAD")) @Inject(method = "apply", at = @At("HEAD"))
public void interceptApply(Map<Identifier, JsonElement> map, ResourceManager resourceManager, Profiler profiler, CallbackInfo info) { public void interceptApply(Map<Identifier, JsonElement> map, ResourceManager resourceManager, Profiler profiler, CallbackInfo info) {
if (GlowstoneWire.CONFIG.replaceGlowstoneDrop) { if (GlowstoneWire.CONFIG.replaceGlowstoneDrop) {
map.put(new Identifier("minecraft", "glowstone"), glowLootTables.glowstonelootTable); map.put(new Identifier("minecraft", "blocks/glowstone"), glowLootTables.glowstonelootTable);
} }
} }
} }

View File

@ -1,7 +1,7 @@
{ {
"schemaVersion": 1, "schemaVersion": 1,
"id": "glowstonewire", "id": "glowstonewire",
"version": "${version}", "version": "1.0.0",
"name": "Glowstone Wire", "name": "Glowstone Wire",
"description": "Adds redstone like dust in the form of glowstone, used to emit a lower light level in a small form factor", "description": "Adds redstone like dust in the form of glowstone, used to emit a lower light level in a small form factor",
@ -9,8 +9,8 @@
"Ganku (Badjman)" "Ganku (Badjman)"
], ],
"contact": { "contact": {
"homepage": "https://fabricmc.net/", "homepage": "",
"sources": "https://github.com/FabricMC/fabric-example-mod" "sources": "https://git.parsell.me/Justi/GlowstoneWire/"
}, },
"license": "MIT", "license": "MIT",
@ -32,9 +32,9 @@
"depends": { "depends": {
"fabricloader": ">=0.7.4", "fabricloader": ">=0.7.4",
"fabric": "*", "fabric": "*",
"minecraft": "1.16.x" "minecraft": "1.16.x",
"cloth-config2": ">=4.11.26"
}, },
"suggests": { "suggests": {
"another-mod": "*"
} }
} }