-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2.0.0 - Config and Smart Leaves resourcepack!
- Loading branch information
Showing
12 changed files
with
182 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/eu/midnightdust/cullleaves/CullLeavesClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package eu.midnightdust.cullleaves; | ||
|
||
import eu.midnightdust.cullleaves.config.CullLeavesConfig; | ||
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig; | ||
import me.sargunvohra.mcmods.autoconfig1u.serializer.JanksonConfigSerializer; | ||
import net.fabricmc.api.ClientModInitializer; | ||
import net.fabricmc.fabric.api.resource.ResourceManagerHelper; | ||
import net.fabricmc.loader.api.FabricLoader; | ||
import net.minecraft.util.Identifier; | ||
|
||
public class CullLeavesClient implements ClientModInitializer { | ||
public static CullLeavesConfig CL_CONFIG; | ||
|
||
public void onInitializeClient() { | ||
AutoConfig.register(CullLeavesConfig.class, JanksonConfigSerializer::new); | ||
CL_CONFIG = AutoConfig.getConfigHolder(CullLeavesConfig.class).getConfig(); | ||
|
||
FabricLoader.getInstance().getModContainer("cullleaves").ifPresent(modContainer -> { | ||
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("cullleaves:smartleaves"), "resourcepacks/smartleaves", modContainer, true); | ||
}); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/eu/midnightdust/cullleaves/config/CullLeavesConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package eu.midnightdust.cullleaves.config; | ||
|
||
import me.sargunvohra.mcmods.autoconfig1u.ConfigData; | ||
import me.sargunvohra.mcmods.autoconfig1u.annotation.Config; | ||
import me.sargunvohra.mcmods.autoconfig1u.annotation.ConfigEntry; | ||
import me.sargunvohra.mcmods.autoconfig1u.shadowed.blue.endless.jankson.Comment; | ||
import net.minecraft.client.render.entity.PlayerModelPart; | ||
|
||
@Config(name = "cullleaves") | ||
public class CullLeavesConfig implements ConfigData { | ||
|
||
@ConfigEntry.Gui.PrefixText // Enable/Disable the mod. Requires Chunk Reload (F3 + A). | ||
public boolean enabled = true; | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/eu/midnightdust/cullleaves/config/ModMenuIntegration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package eu.midnightdust.cullleaves.config; | ||
|
||
import io.github.prospector.modmenu.api.ConfigScreenFactory; | ||
import io.github.prospector.modmenu.api.ModMenuApi; | ||
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig; | ||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
|
||
@Environment(EnvType.CLIENT) | ||
public class ModMenuIntegration implements ModMenuApi { | ||
|
||
@Override | ||
public ConfigScreenFactory<?> getModConfigScreenFactory() { | ||
return parent -> AutoConfig.getConfigScreen(CullLeavesConfig.class, parent).get(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"text.autoconfig.cullleaves.title":"Cull Leaves Config", | ||
"text.autoconfig.cullleaves.option.enabled.@PrefixText":"After changing this setting you have to reload all chunks (F3 + A)", | ||
"text.autoconfig.cullleaves.option.enabled":"Enabled" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
src/main/resources/resourcepacks/smartleaves/assets/minecraft/models/block/leaves.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"credit": "made by Motschen", | ||
"parent": "block/block", | ||
"textures": { | ||
"particle": "#all" | ||
}, | ||
"elements": [ | ||
{ | ||
"name": "main", | ||
"from": [0, 0, 0], | ||
"to": [16, 16, 16], | ||
"faces": { | ||
"north": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "north", "tintindex": 0}, | ||
"east": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "east", "tintindex": 0}, | ||
"south": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "south", "tintindex": 0}, | ||
"west": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "west", "tintindex": 0}, | ||
"up": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "up", "tintindex": 0}, | ||
"down": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "down", "tintindex": 0} | ||
} | ||
}, | ||
{ | ||
"name": "bottom", | ||
"from": [0, 0, 0], | ||
"to": [16, 0, 16], | ||
"faces": { | ||
"up": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "down", "tintindex": 0} | ||
} | ||
}, | ||
{ | ||
"name": "west", | ||
"from": [0, 0, 0], | ||
"to": [0, 16, 16], | ||
"faces": { | ||
"east": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "west", "tintindex": 0} | ||
} | ||
}, | ||
{ | ||
"name": "north", | ||
"from": [0, 0, 0], | ||
"to": [16, 16, 0], | ||
"faces": { | ||
"south": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "north", "tintindex": 0} | ||
} | ||
}, | ||
{ | ||
"name": "east", | ||
"from": [16, 0, 0], | ||
"to": [16, 16, 16], | ||
"rotation": {"angle": 0, "axis": "y", "origin": [23, 8, 8]}, | ||
"faces": { | ||
"west": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "east", "tintindex": 0} | ||
} | ||
}, | ||
{ | ||
"name": "south", | ||
"from": [0, 0, 16], | ||
"to": [16, 16, 16], | ||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 23]}, | ||
"faces": { | ||
"north": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "south", "tintindex": 0} | ||
} | ||
}, | ||
{ | ||
"name": "up", | ||
"from": [0, 16, 0], | ||
"to": [16, 16, 16], | ||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 23, 8]}, | ||
"faces": { | ||
"down": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "up", "tintindex": 0} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
The MIT License | ||
Copyright © 2020 Motschen | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), | ||
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, | ||
and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"pack": { | ||
"pack_format": 6, | ||
"description": "§2Makes the leaves look identical to the optifine smart leaves effect" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.