Skip to content

Commit

Permalink
This Rocks 1.6.0 - 1.18.2
Browse files Browse the repository at this point in the history
- Update to 1.18.2
- Fix #29 (Infinite geyser levitation)
- Fix #27 + Fix #12 (Silk Touch to get Rock)
- Fix #25 (Update Russian transalations)
- Fix #24 (Sticks generating at weird places)
- Fix #8 (Config with adjustable generation chances)
  • Loading branch information
Motschen committed Apr 11, 2022
1 parent 7b1fcfe commit e6a2feb
Show file tree
Hide file tree
Showing 37 changed files with 826 additions and 395 deletions.
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ org.gradle.jvmargs=-Xmx2G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.18-pre5
yarn_mappings=1.18-pre5+build.2
loader_version=0.12.5
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.2
loader_version=0.13.3

# Mod Properties
mod_version = 1.5.2
mod_version = 1.6.0
maven_group = eu.midnightdust.motschen
archives_base_name = rocks

# 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.42.8+1.18
midnightlib_version=0.3.1
fabric_version=0.48.0+1.18.2
midnightlib_version=0.4.0
8 changes: 4 additions & 4 deletions src/main/java/eu/midnightdust/motschen/rocks/RocksClient.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package eu.midnightdust.motschen.rocks;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.object.builder.v1.client.model.FabricModelPredicateProviderRegistry;
import net.minecraft.client.item.ModelPredicateProviderRegistry;
import net.minecraft.util.Identifier;

public class RocksClient implements ClientModInitializer {
@Override
public void onInitializeClient() {
FabricModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("red"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("red")) ? 1 : 0);
FabricModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("pink"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("pink")) ? 1 : 0);
FabricModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("orange"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("orange")) ? 1 : 0);
ModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("red"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("red")) ? 1 : 0);
ModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("pink"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("pink")) ? 1 : 0);
ModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("orange"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("orange")) ? 1 : 0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
import net.minecraft.fluid.Fluids;
import net.minecraft.item.ItemPlacementContext;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtElement;
import net.minecraft.nbt.NbtString;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.BooleanProperty;
Expand Down Expand Up @@ -62,7 +59,6 @@ public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) {
public ItemStack getPickStack(BlockView world, BlockPos pos, BlockState state) {
ItemStack stack = new ItemStack(this);
stack.getOrCreateNbt().putString("variation", state.get(STARFISH_VARIATION).asString());
LOGGER.info(state.get(STARFISH_VARIATION).asString());
return stack;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static void tick(World world, BlockPos pos, BlockState state, OverworldGe
PlayerEntity player = world.getClosestPlayer(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 3, true);
PlayerEntity player2 = world.getClosestPlayer(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 8, true);

if (player2 != null && player2.getY() >= pos.getY() && (pos.getX() <= player2.getX() && pos.getX() + 1 >= player2.getX()) && (pos.getZ() <= player2.getZ() && pos.getZ() + 1 >= player2.getZ())) {
if (player2 != null && player2.getY() >= pos.getY() && player2.getY() <= pos.getY() + 5 && (pos.getX() <= player2.getX() && pos.getX() + 1 >= player2.getX()) && (pos.getZ() <= player2.getZ() && pos.getZ() + 1 >= player2.getZ())) {
player2.addStatusEffect(new StatusEffectInstance(StatusEffects.LEVITATION, 2, 10, true, false, false));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@ public class RocksConfig extends MidnightConfig {
@Comment public static Comment needs_restart;

@Comment public static Comment rocks;
@Entry(name = "block.rocks.rock") public static boolean rock = true;
@Entry(name = "block.rocks.granite_rock") public static boolean granite_rock = true;
@Entry(name = "block.rocks.diorite_rock") public static boolean diorite_rock = true;
@Entry(name = "block.rocks.andesite_rock") public static boolean andesite_rock = true;
@Entry(name = "block.rocks.sand_rock") public static boolean sand_rock = true;
@Entry(name = "block.rocks.red_sand_rock") public static boolean red_sand_rock = true;
@Entry(name = "block.rocks.gravel_rock") public static boolean gravel_rock = true;
@Entry(name = "block.rocks.end_stone_rock") public static boolean end_stone_rock = true;
@Entry(name = "block.rocks.netherrack_rock") public static boolean netherrack_rock = true;
@Entry(name = "block.rocks.soul_soil_rock") public static boolean soul_soil_rock = true;
@Entry(name = "block.rocks.rock") public static int rock_count = 3;
@Entry(name = "block.rocks.granite_rock") public static int granite_rock_count = 3;
@Entry(name = "block.rocks.diorite_rock") public static int diorite_rock_count = 3;
@Entry(name = "block.rocks.andesite_rock") public static int andesite_rock_count = 3;
@Entry(name = "block.rocks.sand_rock") public static int sand_rock_count = 3;
@Entry(name = "block.rocks.red_sand_rock") public static int red_sand_rock_count = 3;
@Entry(name = "block.rocks.gravel_rock") public static int gravel_rock_count = 3;
@Entry(name = "block.rocks.end_stone_rock") public static int end_stone_rock_count = 3;
@Entry(name = "block.rocks.netherrack_rock") public static int netherrack_rock_count = 90;
@Entry(name = "block.rocks.soul_soil_rock") public static int soul_soil_rock_count = 3;

@Comment public static Comment sticks;
@Entry(name = "block.rocks.oak_stick") public static boolean oak_stick = true;
@Entry(name = "block.rocks.spruce_stick") public static boolean spruce_stick = true;
@Entry(name = "block.rocks.birch_stick") public static boolean birch_stick = true;
@Entry(name = "block.rocks.acacia_stick") public static boolean acacia_stick = true;
@Entry(name = "block.rocks.jungle_stick") public static boolean jungle_stick = true;
@Entry(name = "block.rocks.dark_oak_stick") public static boolean dark_oak_stick = true;
@Entry(name = "block.rocks.crimson_stick") public static boolean crimson_stick = true;
@Entry(name = "block.rocks.warped_stick") public static boolean warped_stick = true;
@Entry(name = "block.rocks.oak_stick") public static int oak_stick_count = 3;
@Entry(name = "block.rocks.spruce_stick") public static int spruce_stick_count = 3;
@Entry(name = "block.rocks.birch_stick") public static int birch_stick_count = 3;
@Entry(name = "block.rocks.acacia_stick") public static int acacia_stick_count = 3;
@Entry(name = "block.rocks.jungle_stick") public static int jungle_stick_count = 3;
@Entry(name = "block.rocks.dark_oak_stick") public static int dark_oak_stick_count = 3;
@Entry(name = "block.rocks.crimson_stick") public static int crimson_stick_count = 90;
@Entry(name = "block.rocks.warped_stick") public static int warped_stick_count = 90;

@Comment public static Comment misc;
@Entry(name = "block.rocks.pinecone") public static boolean pinecone = true;
@Entry(name = "block.rocks.geyser") public static boolean geyser = true;
@Entry(name = "block.rocks.nether_geyser") public static boolean nether_geyser = true;
@Entry(name = "block.rocks.seashell") public static boolean seashell = true;
@Entry(name = "block.rocks.starfish") public static boolean starfish = true;
@Entry public static boolean underwater_seashell = true;
@Entry public static boolean underwater_starfish = true;
@Entry(name = "block.rocks.pinecone") public static int pinecone_count = 3;
@Entry(name = "block.rocks.geyser") public static int geyser_count = 3;
@Entry(name = "block.rocks.nether_geyser") public static int nether_geyser_count = 30;
@Entry(name = "block.rocks.seashell") public static int seashell_count = 1;
@Entry(name = "block.rocks.starfish") public static int starfish_count = 1;
@Entry public static int underwater_seashell_count = 3;
@Entry public static int underwater_starfish_count = 3;
}

This file was deleted.

Loading

0 comments on commit e6a2feb

Please sign in to comment.