Skip to content

Commit

Permalink
Merge pull request #31 from warior456/main
Browse files Browse the repository at this point in the history
0.0.7 for 1.20-1.20.1
  • Loading branch information
warior456 authored Jun 27, 2023
2 parents a597a07 + 850ca08 commit 424a54c
Show file tree
Hide file tree
Showing 66 changed files with 919 additions and 166 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ This mod adds a new dimension called "Sculk Depths" to Minecraft.
To access this dimension, follow these steps:

1. Search for a deep dark biome with an ancient city.
2. Summon and defeat a Warden to obtain its new drop, the Soul Heart.
3. Clear all the sculk veins from the middle of the reinforced deepslate in the center of the city.
4. Use the Soul Heart to light the portal.
2. Summon a Warden and let it kill a passive mob like a cow, sheep, or horse OR kill the warden.
3. this will drop Energy Essence which is used to craft an Energized Flint and Steel
4. Clear all the sculk veins from the middle of the reinforced deepslate in the center of the city.
5. Use the Energized Flint and Steel to light the portal.

When entering this dimension, it is recommended to bring a netherite pickaxe as the dimension is mostly made of a very hard block called Umbrusk.

Expand All @@ -24,7 +25,8 @@ When entering this dimension, it is recommended to bring a netherite pickaxe as
- Four new biomes.
- A new structure (work in progress).
- A new hostile mob: The Glomper. It attacks players using an elytra, so be careful while flying around!
- The Warden drops the Soul Heart, which is used to open the portal.
- Energy Essence drops when the warden kills a passive mob or when the warden is killed, this is used to craft an Energized Flint and Steel to open the portal.
- Energized Flint and Steel: can light most blocks with Soul Fire and lights the portal
- new blocks:
- Cephlera Light
- Nine new block sets:
Expand Down Expand Up @@ -55,5 +57,9 @@ When entering this dimension, it is recommended to bring a netherite pickaxe as
## License
Please refer to the [LICENSE.md](https://github.com/warior456/Sculk-Depths/blob/main/LICENSE.md) file for licensing details.

For any questions or issues, please reach out to us on our [GitHub repository](https://github.com/warior456/Sculk-Depths).
For any questions or issues, please reach out to us on our [GitHub repository](https://github.com/warior456/Sculk-Depths) or our [Discord Server](https://discord.gg/dxANwW23Ub)

## Need a Minecraft server?
[![pebblehost](https://github.com/warior456/Sculk-Depths/assets/66562258/ae831af6-309b-4f11-b896-5f4eb7567088)](https://billing.pebblehost.com/aff.php?aff=2968)
Starting at just 1$/month for 1GB RAM [Check it out](https://billing.pebblehost.com/aff.php?aff=2968)

3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ repositories {
maven { url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' }
maven { url 'https://maven.kyrptonaught.dev/' }
maven { url "https://api.modrinth.com/maven" }
maven { url = "https://jitpack.io" }
}

dependencies {

include(implementation(annotationProcessor("com.github.llamalad7.mixinextras:mixinextras-fabric:0.2.0-beta.8")))
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
Expand Down
4 changes: 1 addition & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ org.gradle.parallel=true
loader_version=0.14.21

# Mod Properties
mod_version = 0.0.6_b
mod_version = 0.0.7
maven_group = com.example
archives_base_name = sculk_depths

# Dependencies

fabric_version= 0.83.0+1.20.1

customportalapi_version = 0.0.1-beta64-1.20
geckolib_version = fabric-1.20:4.2

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/net/ugi/sculk_depths/SculkDepths.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import net.ugi.sculk_depths.item.ModItems;
import net.ugi.sculk_depths.portal.Portals;
import net.ugi.sculk_depths.sound.ModSounds;
import net.ugi.sculk_depths.util.ModLootTableModifiers;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -31,6 +32,7 @@ public void onInitialize() {
ModBlocks.registerModBlocks();
Portals.registerModPortals();
ModSounds.registerModSounds();
ModLootTableModifiers.modifyLootTables();
FabricDefaultAttributeRegistry.register(ModEntities.GLOMPER, GlomperEntity.setAttributes());

LOGGER.info("sculk_depths has loaded");
Expand Down
1 change: 1 addition & 0 deletions src/main/java/net/ugi/sculk_depths/SculkDepthsClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public void onInitializeClient() {
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.VALTROX_SAPLING, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.CEPHLERA, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.CEPHLERA_LIGHT, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.SOUL_FIRE, RenderLayer.getCutout());

}
}
102 changes: 58 additions & 44 deletions src/main/java/net/ugi/sculk_depths/block/ModBlocks.java

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions src/main/java/net/ugi/sculk_depths/block/ModFluidBlock.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package net.ugi.sculk_depths.block;
package net.ugi.sculk_depths.block.custom;

import net.minecraft.block.*;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.random.Random;
import net.minecraft.util.shape.VoxelShape;
import net.ugi.sculk_depths.block.ModBlocks;

public class CephleraBlock extends AbstractPlantBlock {
public static final VoxelShape SHAPE = Block.createCuboidShape(1.0, 0.0, 1.0, 15.0, 16.0, 15.0);
Expand All @@ -13,6 +14,6 @@ public CephleraBlock(AbstractBlock.Settings settings) {
}

protected AbstractPlantStemBlock getStem() {
return (AbstractPlantStemBlock)ModBlocks.CEPHLERA_LIGHT;
return (AbstractPlantStemBlock) ModBlocks.CEPHLERA_LIGHT;
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package net.ugi.sculk_depths.block;
package net.ugi.sculk_depths.block.custom;


import net.minecraft.block.*;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.random.Random;
import net.minecraft.util.shape.VoxelShape;
import net.ugi.sculk_depths.block.ModBlocks;

public class CephleraLightBlock extends AbstractPlantStemBlock {
protected static final VoxelShape SHAPE = Block.createCuboidShape(1.0, 0.0, 1.0, 15.0, 16.0, 15.0);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
package net.ugi.sculk_depths.block.custom;

import com.mojang.datafixers.types.templates.Tag;
import net.minecraft.block.*;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemPlacementContext;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.IntProperty;
import net.minecraft.state.property.Properties;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.random.Random;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.world.*;

public class KryslumEnrichedSoilBLock extends FarmlandBlock {

public static final IntProperty MOISTURE = Properties.MOISTURE;
protected static final VoxelShape SHAPE = Block.createCuboidShape(0.0, 0.0, 0.0, 16.0, 15.0, 16.0);
public static final int MAX_MOISTURE = 7;

public KryslumEnrichedSoilBLock(AbstractBlock.Settings settings) {
super(settings);
this.setDefaultState((BlockState)((BlockState)this.stateManager.getDefaultState()).with(MOISTURE, MAX_MOISTURE));
}



@Override
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) {
if (direction == Direction.UP && !state.canPlaceAt(world, pos)) {
world.scheduleBlockTick(pos, this, 1);
}
return super.getStateForNeighborUpdate(state, direction, neighborState, world, pos, neighborPos);
}


@Override
public BlockState getPlacementState(ItemPlacementContext ctx) {
if (!this.getDefaultState().canPlaceAt(ctx.getWorld(), ctx.getBlockPos())) {
return Blocks.DIRT.getDefaultState();
}
return super.getPlacementState(ctx);
}


@Override
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
return SHAPE;
}

@Override
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
}

@Override
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
}

@Override
public void onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance) {
}



@Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(MOISTURE);
}

}
46 changes: 46 additions & 0 deletions src/main/java/net/ugi/sculk_depths/block/custom/SoulFireBlock.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package net.ugi.sculk_depths.block.custom;


import net.kyrptonaught.customportalapi.portal.PortalPlacer;
import net.minecraft.block.*;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.World;
import net.minecraft.world.WorldAccess;
import net.minecraft.world.WorldView;

import static net.ugi.sculk_depths.portal.Portals.SOUL_FIRE;


public class SoulFireBlock extends AbstractFireBlock {



public SoulFireBlock(AbstractBlock.Settings settings) {
super(settings, 2);
}

@Override
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) {
if (this.canPlaceAt(state, world, pos)) {
return this.getDefaultState();
}
return Blocks.AIR.getDefaultState();
}

@Override
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
return isSoulBase(world.getBlockState(pos.down()));
}

public static boolean isSoulBase(BlockState state) {
//return true || state.isOf(Blocks.REINFORCED_DEEPSLATE) || state.isIn(BlockTags.LOGS) || state.isIn(BlockTags.INFINIBURN_END);
return !state.isOf(Blocks.AIR);
}

@Override
protected boolean isFlammable(BlockState state) {
return true;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package net.ugi.sculk_depths.block.custom;

import net.minecraft.block.*;


public class nonConnectingBlock extends Block {


public nonConnectingBlock(Settings settings) {
super(settings);
}

//@Override
public static boolean cannotConnect(BlockState state) {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public Identifier getTextureLocation(GlomperEntity animatable) {

@Override
protected int getBlockLight(GlomperEntity entity, BlockPos pos) {
return 14;
return 15;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected void initGoals() {
}


public class GlomperTargetGoal
public static class GlomperTargetGoal
extends ActiveTargetGoal {

private boolean pauseWhenMobIdle;
Expand All @@ -100,6 +100,7 @@ public boolean shouldContinue() {
if (!this.pauseWhenMobIdle) {
return !this.mob.getNavigation().isIdle();
}
assert this.target != null;
if (!this.target.isFallFlying()) {
return false;
}
Expand Down
26 changes: 11 additions & 15 deletions src/main/java/net/ugi/sculk_depths/fluid/KryslumFluid.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import net.minecraft.sound.SoundEvent;
import net.minecraft.sound.SoundEvents;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.IntProperty;
import net.minecraft.state.property.Properties;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
Expand All @@ -24,7 +25,8 @@

import java.util.Optional;

public class KryslumFluid extends FlowableFluid {
public abstract class KryslumFluid extends FlowableFluid {
public static final IntProperty LEVEL = Properties.LEVEL_1_8;
public KryslumFluid() {
}

Expand All @@ -40,6 +42,7 @@ public Item getBucketItem() {
return ModItems.KRYSLUM_BUCKET;
}

@Override
public void randomDisplayTick(World world, BlockPos pos, FluidState state, Random random) {
if (!state.isStill() && !(Boolean) state.get(FALLING)) {
if (random.nextInt(64) == 0) {
Expand All @@ -50,6 +53,7 @@ public void randomDisplayTick(World world, BlockPos pos, FluidState state, Rando
}
}

@Override
@Nullable
public ParticleEffect getParticle() {
return ParticleTypes.SCULK_CHARGE_POP;
Expand Down Expand Up @@ -78,23 +82,20 @@ public boolean isStill(FluidState state) {
}

public boolean matchesType(Fluid fluid) {
return fluid == ModFluids.KRYSLUM_STILL || fluid == ModFluids.KRYSLUM_FLOWING;
return fluid == ModFluids.KRYSLUM_STILL || fluid == ModFluids.KRYSLUM_FLOWING; //perhaps here for adding farmland
}

public int getLevelDecreasePerBlock(WorldView world) {
return 2;
}

@Override
public int getLevel(FluidState state) {
return 0;
}

public int getTickRate(WorldView world) {
return 40;
}

public boolean canBeReplacedWith(FluidState state, BlockView world, BlockPos pos, Fluid fluid, Direction direction) {
//noinspection deprecation
return direction == Direction.DOWN && !fluid.isIn(FluidTags.WATER);
}

Expand All @@ -107,31 +108,26 @@ public Optional<SoundEvent> getBucketFillSound() {
}

public static class Flowing extends KryslumFluid {
public Flowing() {
}

@Override
protected void appendProperties(StateManager.Builder<Fluid, FluidState> builder) {
super.appendProperties(builder);
builder.add(LEVEL);
}

@Override
public int getLevel(FluidState state) {
return state.get(LEVEL);
}

public boolean isStill(FluidState state) {
return false;
}
}

public static class Still extends KryslumFluid {
public Still() {
}

@Override
public int getLevel(FluidState state) {
return 8;
}

@Override
public boolean isStill(FluidState state) {
return true;
}
Expand Down
Loading

0 comments on commit 424a54c

Please sign in to comment.