Skip to content

Commit

Permalink
Merge pull request #187 from Shnupbups/master
Browse files Browse the repository at this point in the history
Finished 1.15 update, ready to release
  • Loading branch information
Shnupbups authored Dec 19, 2019
2 parents 08bad2d + 918b879 commit 22ca40e
Show file tree
Hide file tree
Showing 106 changed files with 829 additions and 599 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ minecraft {

dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings "net.fabricmc:yarn:${yarn_mappings}:v2"
mappings "net.fabricmc:yarn:${minecraft_version}+build.${yarn_mappings}"

modApi "net.fabricmc:fabric-loader:${loader_version}"
modApi "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
Expand Down
20 changes: 10 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ org.gradle.daemon=false

# Minecraft & Fabric

minecraft_version=1.15
yarn_mappings=1.15+build.2
loader_version=0.7.2+build.174
fabric_version=0.4.24+build.279-1.15
minecraft_version=1.15.1
yarn_mappings=3:v2
loader_version=0.7.2+build.175
fabric_version=0.4.25+build.282-1.15

# Versioning, Maven, and publishing

maven_group=fabric-community
archives_base_name=TheHallow
mod_version=1.1.0-beta
mod_version=1.1.1-beta+1.15.1

license_header=MIT

Expand All @@ -22,20 +22,20 @@ github_repository=the-hallow

# curseforge_id=
release_type=beta
release_version=1.15-pre2
release_version=1.15.1

required_dep_slugs=fabric-api

# Dependencies

modmenu_version=1.7.15-unstable.19w46b+build.12
rei_version=3.2.11-unstable.201911230930
modmenu_version=1.8.1+build.17
rei_version=3.2.26


cardinal_components_version=1.15-SNAPSHOT
cardinal_components_version=2.1.0
tiny_config_version=1.1.2
trinkets_version=v2.3.0
world_traveler_version=1.0.5
libcd_version=1.6.3+1.15
libcd_version=2.0.1+1.15


11 changes: 6 additions & 5 deletions src/main/java/com/fabriccommunity/thehallow/HallowedConfig.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
package com.fabriccommunity.thehallow;

import blue.endless.jankson.Jankson;
import blue.endless.jankson.JsonElement;
import blue.endless.jankson.JsonGrammar;
import blue.endless.jankson.JsonObject;
import blue.endless.jankson.api.SyntaxError;

import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import blue.endless.jankson.Jankson;
import blue.endless.jankson.JsonElement;
import blue.endless.jankson.JsonGrammar;
import blue.endless.jankson.JsonObject;
import blue.endless.jankson.api.SyntaxError;

public class HallowedConfig {

Expand Down
22 changes: 11 additions & 11 deletions src/main/java/com/fabriccommunity/thehallow/TheHallow.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
package com.fabriccommunity.thehallow;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
import net.fabricmc.loader.api.FabricLoader;

import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier;
import net.minecraft.util.SignType;

import com.fabriccommunity.thehallow.compat.libcd.HallowTweaker;
import com.fabriccommunity.thehallow.registry.HallowedBiomes;
Expand All @@ -22,21 +28,15 @@
import com.fabriccommunity.thehallow.registry.HallowedWorldGen;
import com.fabriccommunity.thehallow.registry.MinecraftItems;
import com.fabriccommunity.thehallow.world.HallowedChunkGeneratorType;

import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier;
import net.minecraft.util.SignType;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class TheHallow implements ModInitializer {
public static final String MOD_ID = "thehallow";
public static final Logger LOGGER = LogManager.getLogger("The Hallow");
public static final ItemGroup GROUP = FabricItemGroupBuilder.build(id("group"), () -> new ItemStack(HallowedItems.REAPERS_SCYTHE));
public static final ItemGroup PUMPKINS = FabricItemGroupBuilder.build(id("pumpkins"), () -> new ItemStack(HallowedBlocks.WITCHED_PUMPKIN));
public static final SignType HALLOWED_SIGN_TYPE = new SignTypeAccess("thehallow:hallowed");
public static final SignType DEADWOOD_SIGN_TYPE = new SignTypeAccess("thehallow:deadwood");

public static Identifier id(String name) {
return new Identifier(MOD_ID, name);
Expand Down
51 changes: 11 additions & 40 deletions src/main/java/com/fabriccommunity/thehallow/TheHallowClient.java
Original file line number Diff line number Diff line change
@@ -1,52 +1,23 @@
package com.fabriccommunity.thehallow;

import com.fabriccommunity.thehallow.client.FluidResourceLoader;
import com.fabriccommunity.thehallow.client.HallowedClientNetworking;
import com.fabriccommunity.thehallow.client.HallowedColors;
import com.fabriccommunity.thehallow.client.render.*;
import com.fabriccommunity.thehallow.registry.HallowedBlockEntities;
import com.fabriccommunity.thehallow.registry.HallowedBlocks;
import com.fabriccommunity.thehallow.registry.HallowedEntities;
import com.fabriccommunity.thehallow.registry.HallowedFluids;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
import net.fabricmc.fabric.api.client.rendereregistry.v1.BlockEntityRendererRegistry;
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
import net.minecraft.client.render.RenderLayer;

import net.minecraft.resource.ResourceType;

import com.fabriccommunity.thehallow.client.FluidResourceLoader;
import com.fabriccommunity.thehallow.client.HallowedBlockEntityRenderers;
import com.fabriccommunity.thehallow.client.HallowedClientNetworking;
import com.fabriccommunity.thehallow.client.HallowedColors;
import com.fabriccommunity.thehallow.client.HallowedEntityRenderers;
import com.fabriccommunity.thehallow.client.HallowedRenderLayers;

public class TheHallowClient implements ClientModInitializer {
@Override
public void onInitializeClient() {
EntityRendererRegistry.INSTANCE.register(HallowedEntities.PUMPCOWN, (dispatcher, context) -> new PumpcownEntityRenderer(dispatcher));
EntityRendererRegistry.INSTANCE.register(HallowedEntities.CROW, (dispatcher, context) -> new CrowEntityRenderer(dispatcher));
EntityRendererRegistry.INSTANCE.register(HallowedEntities.HALLOWED_TREASURE_CHEST, ((dispatcher, context) -> new HallowedTreasureChestEntityRenderer(dispatcher)));
EntityRendererRegistry.INSTANCE.register(HallowedEntities.RESTLESS_CACTUS, (dispatcher, context) -> new HallowedCactusEntityRenderer(dispatcher));
EntityRendererRegistry.INSTANCE.register(HallowedEntities.MUMMY, (dispatcher, context) -> new MummyEntityRenderer(dispatcher));
EntityRendererRegistry.INSTANCE.register(HallowedEntities.CULTIST, (dispatcher, context) -> new CultistEntityRenderer(dispatcher));
EntityRendererRegistry.INSTANCE.register(HallowedEntities.SHOTGUN_PROJECTILE, (dispatcher, context) -> new ShotgunProjectileEntityRenderer(dispatcher));

BlockEntityRendererRegistry.INSTANCE.register(HallowedBlockEntities.TINY_PUMPKIN, TinyPumpkinRenderer::new);
BlockEntityRendererRegistry.INSTANCE.register(HallowedBlockEntities.INFUSION_PILLAR_BLOCK_ENTITY, InfusionPillarBlockEntityRenderer::new);
BlockEntityRendererRegistry.INSTANCE.register(HallowedBlockEntities.INFUSION_ALTAR_BLOCK_ENTITY, InfusionAltarBlockEntityRenderer::new);
BlockEntityRendererRegistry.INSTANCE.register(HallowedBlockEntities.HALLOWED_TREASURE_CHEST_BE, HallowedTreasureChestBlockEntityRenderer::new);

BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getTranslucent(), HallowedBlocks.TAINTED_GLASS, HallowedBlocks.TAINTED_GLASS_PANE,
HallowedBlocks.SOUL_GLASS, HallowedBlocks.SOUL_GLASS_PANE, HallowedBlocks.HALLOWED_GATE,
HallowedBlocks.WITCH_WATER_BUBBLE_COLUMN);

BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), HallowedBlocks.BREAD_CRUMBS, HallowedBlocks.HALLOWED_TREASURE_CHEST,
HallowedBlocks.INFUSION_ALTAR_BLOCK, HallowedBlocks.INFUSION_PILLAR_BLOCK, HallowedBlocks.RESTLESS_CACTUS,
HallowedBlocks.TINY_PUMPKIN, HallowedBlocks.TOMBSTONE, HallowedBlocks.BRAMBLES,
HallowedBlocks.DEADER_BUSH, HallowedBlocks.GLOOMSHROOM, HallowedBlocks.EERIE_GRASS,
HallowedBlocks.TALL_EERIE_GRASS, HallowedBlocks.DEADWOOD_DOOR, HallowedBlocks.DEADWOOD_TRAPDOOR,
HallowedBlocks.DEADWOOD_VINES);

BlockRenderLayerMap.INSTANCE.putFluids(RenderLayer.getSolid(), HallowedFluids.BLOOD, HallowedFluids.FLOWING_BLOOD,
HallowedFluids.WITCH_WATER, HallowedFluids.FLOWING_WITCH_WATER);

HallowedEntityRenderers.init();
HallowedBlockEntityRenderers.init();
HallowedRenderLayers.init();
HallowedClientNetworking.init();
HallowedColors.init();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ public BleedingBlock(Settings settings) {
super(settings);
}

@SuppressWarnings("deprecation")
@Override
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
WitchWaterBubbleColumnBlock.update(world, pos.up(), true);
}

@SuppressWarnings("deprecation")
@Override
public BlockState getStateForNeighborUpdate(BlockState state, Direction dir, BlockState state2, IWorld iworld, BlockPos pos1, BlockPos pos2) {
if (dir == Direction.UP && state2.getBlock() == HallowedBlocks.WITCH_WATER_BLOCK) {
Expand All @@ -36,14 +38,13 @@ public BlockState getStateForNeighborUpdate(BlockState state, Direction dir, Blo
return super.getStateForNeighborUpdate(state, dir, state2, iworld, pos1, pos2);
}

@SuppressWarnings("deprecation")
@Override
public void randomTick(BlockState state, ServerWorld world, BlockPos pos1, Random rand) {
BlockPos pos2 = pos1.up();
if (world.getFluidState(pos1).matches(HallowedTags.Fluids.WITCH_WATER)) {
world.playSound(null, pos1, SoundEvents.ENTITY_DROWNED_HURT_WATER, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F);
if (world instanceof ServerWorld) {
((ServerWorld) world).spawnParticles(ParticleTypes.CURRENT_DOWN, (double) pos2.getX() + 0.5D, (double) pos2.getY() + 0.25D, (double) pos2.getZ() + 0.5D, 8, 0.5D, 0.25D, 0.5D, 0.0D);
}
world.spawnParticles(ParticleTypes.CURRENT_DOWN, (double) pos2.getX() + 0.5D, (double) pos2.getY() + 0.25D, (double) pos2.getZ() + 0.5D, 8, 0.5D, 0.25D, 0.5D, 0.0D);
}
}

Expand All @@ -52,6 +53,7 @@ public int getTickRate(WorldView viewableworld) {
return 20;
}

@SuppressWarnings("deprecation")
@Override
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState state2, boolean bool) {
world.getBlockTickScheduler().schedule(pos, this, this.getTickRate(world));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public BramblesBlock(Settings settings) {
super(settings);
}

@SuppressWarnings("deprecation")
@Override
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
if (entity instanceof LivingEntity && entity.getType() != HallowedEntities.CROW && entity.getType() != HallowedEntities.PUMPCOWN) {
Expand All @@ -39,6 +40,7 @@ public void onEntityCollision(BlockState state, World world, BlockPos pos, Entit
}
}

@SuppressWarnings("deprecation")
@Override
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, EntityContext context) {
return SHAPE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,26 @@ public BreadCrumbsBlock(Settings settings) {
super(settings);
}

@SuppressWarnings("deprecation")
@Override
public boolean canPlaceAtSide(BlockState state, BlockView blockView, BlockPos pos, BlockPlacementEnvironment bpe) {
return bpe == BlockPlacementEnvironment.LAND;
}

@SuppressWarnings("deprecation")
@Override
public VoxelShape getOutlineShape(BlockState state, BlockView blockView, BlockPos pos, EntityContext context) {
return SHAPE;
}

@SuppressWarnings("deprecation")
@Override
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
BlockPos down = pos.down();
return Block.isFaceFullSquare(world.getBlockState(down).getCollisionShape(world, down), Direction.UP);
}

@SuppressWarnings("deprecation")
@Override
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState state2, IWorld world, BlockPos pos, BlockPos pos2) {
return !state.canPlaceAt(world, pos) ? Blocks.AIR.getDefaultState() : super.getStateForNeighborUpdate(state, direction, state2, world, pos, pos2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

import java.util.Random;

public class TaintedSandBlock extends FallingBlock {
public TaintedSandBlock(Block.Settings settings) {
public class CoarseTaintedSandBlock extends FallingBlock {
public CoarseTaintedSandBlock(Block.Settings settings) {
super(settings);
}

Expand All @@ -21,6 +21,7 @@ public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Ran
super.scheduledTick(state, world, pos, rand);
}

@SuppressWarnings("deprecation")
@Override
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos pos2, boolean bool) {
world.getBlockTickScheduler().schedule(pos, this, this.getTickRate(world));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.fabriccommunity.thehallow.block;

import com.fabriccommunity.thehallow.registry.HallowedBlocks;
import net.minecraft.block.BlockState;
import net.minecraft.block.CarvedPumpkinBlock;
import net.minecraft.block.PumpkinBlock;
Expand All @@ -17,6 +16,8 @@
import net.minecraft.util.math.Direction;
import net.minecraft.world.World;

import com.fabriccommunity.thehallow.registry.HallowedBlocks;

public class ColoredPumpkinBlock extends PumpkinBlock {

private PumpkinColor color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
import net.minecraft.util.math.Box;
import net.minecraft.world.World;

import com.fabriccommunity.thehallow.recipe.fluid.FluidRecipe;

import java.util.List;
import java.util.Optional;
import com.fabriccommunity.thehallow.recipe.fluid.FluidRecipe;

public abstract class CraftingFluidBlock extends FluidBlock {
public final FluidRecipe.Type recipeType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public DeaderBushBlock(Block.Settings settings) {
super(settings);
}

@SuppressWarnings("deprecation")
@Override
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, EntityContext context) {
return SHAPE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import net.minecraft.block.TallPlantBlock;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.math.BlockPos;

import com.fabriccommunity.thehallow.registry.HallowedBlocks;

import java.util.Random;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.fabriccommunity.thehallow.block;

import com.fabriccommunity.thehallow.registry.HallowedBlocks;
import com.fabriccommunity.thehallow.registry.HallowedTags;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.ItemPlacementContext;
Expand All @@ -12,6 +10,9 @@
import net.minecraft.util.math.Direction;
import net.minecraft.world.World;

import com.fabriccommunity.thehallow.registry.HallowedBlocks;
import com.fabriccommunity.thehallow.registry.HallowedTags;

import javax.annotation.Nullable;

public class HallowedGateBlock extends Block {
Expand Down Expand Up @@ -44,7 +45,8 @@ protected void appendProperties(StateManager.Builder<Block, BlockState> builder)
public BlockState getPlacementState(ItemPlacementContext context) {
return getDefaultState().with(FACING, context.getPlayerFacing().getOpposite());
}


@SuppressWarnings("deprecation")
@Override
public int getLuminance(BlockState state) {
return 6;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public HallowedLogBlock(MaterialColor topColor, Settings settings) {
super(topColor, settings);
}

@SuppressWarnings("deprecation")
@Override
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
ItemStack stack = player.getStackInHand(hand);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package com.fabriccommunity.thehallow.block;

import com.fabriccommunity.thehallow.TheHallow;

import net.minecraft.block.SignBlock;
import net.minecraft.util.Identifier;
import net.minecraft.util.SignType;

public class HallowedSignBlock extends SignBlock implements HallowedSign {
private final Identifier texture;

public HallowedSignBlock(Identifier texture, Settings settings) {
super(settings, TheHallow.HALLOWED_SIGN_TYPE);
public HallowedSignBlock(Identifier texture, SignType type, Settings settings) {
super(settings, type);
this.texture = texture;
}

Expand Down
Loading

0 comments on commit 22ca40e

Please sign in to comment.