Skip to content

Commit

Permalink
VisualOverhaul 4.1.0 - 1.18.2, colored lilypads and improvements
Browse files Browse the repository at this point in the history
Fix #29
Fix #27
Fix #26
Fix #25
Fix #24
  • Loading branch information
Motschen committed Mar 10, 2022
1 parent 01f894a commit 37e5789
Show file tree
Hide file tree
Showing 73 changed files with 94 additions and 21 deletions.
13 changes: 6 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ org.gradle.jvmargs=-Xmx2G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.18.1
yarn_mappings=1.18.1+build.5
loader_version=0.12.12
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.2
loader_version=0.13.3

# Mod Properties
mod_version = 4.0.0
mod_version = 4.1.0
maven_group = eu.midnightdust
archives_base_name = visualoverhaul

# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.44.0+1.18
mod_menu_version = 2.0.0-beta.5
midnightlib_version=0.3.1
fabric_version=0.47.10+1.18.2
midnightlib_version=0.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
import net.minecraft.util.collection.DefaultedList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.biome.BuiltinBiomes;

import java.util.logging.LogManager;

import static eu.midnightdust.visualoverhaul.VisualOverhaul.*;

Expand Down Expand Up @@ -128,6 +125,7 @@ public void onInitializeClient() {
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("visualoverhaul","nobrewingbottles"), modContainer, ResourcePackActivationType.DEFAULT_ENABLED);
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("visualoverhaul","fancyfurnace"), modContainer, ResourcePackActivationType.DEFAULT_ENABLED);
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("visualoverhaul","coloredwaterbucket"), modContainer, ResourcePackActivationType.DEFAULT_ENABLED);
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("visualoverhaul","rounddiscs"), modContainer, ResourcePackActivationType.ALWAYS_ENABLED);
});


Expand All @@ -148,6 +146,11 @@ public void onInitializeClient() {
grassColor = -8934609;
}
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> tintIndex == 0 ? -1 : waterColor, Items.WATER_BUCKET);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> tintIndex == 0 ? -1 : waterColor, Items.AXOLOTL_BUCKET);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> tintIndex == 0 ? -1 : waterColor, Items.COD_BUCKET);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> tintIndex == 0 ? -1 : waterColor, Items.PUFFERFISH_BUCKET);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> tintIndex == 0 ? -1 : waterColor, Items.TROPICAL_FISH_BUCKET);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> tintIndex == 0 ? -1 : waterColor, Items.SALMON_BUCKET);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> grassColor, Items.GRASS_BLOCK);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> grassColor, Items.GRASS);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> grassColor, Items.TALL_GRASS);
Expand All @@ -157,6 +160,9 @@ public void onInitializeClient() {
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> foliageColor, Items.DARK_OAK_LEAVES);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> foliageColor, Items.JUNGLE_LEAVES);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> foliageColor, Items.OAK_LEAVES);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> foliageColor, Items.VINE);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> foliageColor, Items.SUGAR_CANE);
if (VOConfig.coloredLilypad) ColorProviderRegistry.ITEM.register((stack, tintIndex) -> foliageColor, Items.LILY_PAD);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> {
if ((PotionUtil.getPotion(stack) == Potions.WATER || PotionUtil.getPotion(stack) == Potions.MUNDANE || PotionUtil.getPotion(stack) == Potions.THICK || PotionUtil.getPotion(stack) == Potions.AWKWARD) && tintIndex == 0) {
return waterColor;
Expand All @@ -177,5 +183,8 @@ public void onInitializeClient() {
}, Items.LINGERING_POTION);
});
}
if (VOConfig.coloredLilypad) {
ColorProviderRegistry.BLOCK.register((state, world, pos, tintIndex) -> world != null ? world.getColor(pos, BiomeColors.FOLIAGE_COLOR) : 0, Blocks.LILY_PAD);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void render(E blockEntity, float tickDelta, MatrixStack matrices, VertexC

matrices.pop();
}
if (!item2.isEmpty() && !ItemTags.LOGS_THAT_BURN.contains(item2.getItem()) && !ItemTags.PLANKS.contains(item2.getItem())) {
if (!item2.isEmpty() && !item2.isIn(ItemTags.LOGS_THAT_BURN) && !item2.isIn(ItemTags.PLANKS)) {
matrices.push();

matrices.translate(0.5f, 0.08f, 0.5f);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
import eu.midnightdust.lib.config.MidnightConfig;

public class VOConfig extends MidnightConfig {
@Entry public static boolean brewingstand = true;
@Entry public static boolean jukebox = true;
@Entry public static boolean jukebox_fake_block = true;
@Entry public static boolean furnace = true;
@Entry public static boolean smoker_particles = true;
@Entry public static boolean blast_furnace_particles = true;
@Entry public static boolean coloredItems = true;
@Entry public static boolean potionEnchantmentGlint = true;
@Client @Entry public static boolean brewingstand = true;
@Client @Entry public static boolean jukebox = true;
@Client @Entry public static boolean jukebox_fake_block = true;
@Client @Entry public static boolean furnace = true;
@Client @Entry public static boolean smoker_particles = true;
@Client @Entry public static boolean blast_furnace_particles = true;
@Client @Entry public static boolean coloredItems = true;
@Client @Entry public static boolean coloredLilypad = true;
@Client @Entry public static boolean potionEnchantmentGlint = true;
}
2 changes: 2 additions & 0 deletions src/main/resources/assets/visualoverhaul/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
"visualoverhaul.midnightconfig.blast_furnace_particles":"Blast Furnace Particles",
"visualoverhaul.midnightconfig.coloredItems":"Biome-based item colors",
"visualoverhaul.midnightconfig.coloredItems.tooltip":"§cNeeds restart!",
"visualoverhaul.midnightconfig.coloredLilypad":"Biome-based Lily Pad color",
"visualoverhaul.midnightconfig.coloredLilypad.tooltip":"§cNeeds restart!",
"visualoverhaul.midnightconfig.potionEnchantmentGlint":"Potion enchantment glint"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures": {
"layer1": "item/axolotl_bucket_overlay",
"layer0": "item/axolotl_bucket"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures": {
"layer1": "item/fish_bucket_overlay",
"layer0": "item/cod_bucket"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures": {
"layer1": "item/pufferfish_bucket_overlay",
"layer0": "item/pufferfish_bucket"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures": {
"layer1": "item/fish_bucket_overlay",
"layer0": "item/salmon_bucket"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures": {
"layer1": "item/fish_bucket_overlay",
"layer0": "item/tropical_fish_bucket"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 8,
"description": "Makes the water bucket also change it's color based on biome color"
"description": "§2Makes the water bucket respect biome colors"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 8,
"description": "§2Removes the bottles from the brewing stand texture"
"description": "§2Removes the bottles from the brewing stand"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "minecraft:item/music_disc_otherside"
},

"overrides": [
{
"predicate": {
"round": 1
},
"model": "minecraft:item/music_disc_otherside_round"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "visualoverhaul:item/round_disc",
"textures": {
"0": "minecraft:item/music_disc_otherside"
}
}
6 changes: 6 additions & 0 deletions src/main/resources/resourcepacks/rounddiscs/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"pack": {
"pack_format": 8,
"description": "§2Makes the spinning discs on Jukeboxes round"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 37e5789

Please sign in to comment.