Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ dependencies {
modLocalRuntime("me.shedaniel:RoughlyEnoughItems-fabric:${rei_version}")

modCompileOnly "maven.modrinth:yttr:${yttr_version}"
modLocalRuntime "maven.modrinth:yttr:${yttr_version}"
//modLocalRuntime "maven.modrinth:yttr:${yttr_version}"

modImplementation("com.simibubi.create:create-fabric-1.18.2:${create_version}")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.github.ethanicuss.astraladditions;

import com.github.ethanicuss.astraladditions.entities.ModEntities;
import com.github.ethanicuss.astraladditions.fluids.ModFluids;
import com.github.ethanicuss.astraladditions.particle.ModParticles;
import com.github.ethanicuss.astraladditions.registry.ModEntities;
import com.github.ethanicuss.astraladditions.registry.ModFluids;
import com.github.ethanicuss.astraladditions.registry.ModParticles;
import com.github.ethanicuss.astraladditions.playertracker.WorldRegister;
import com.github.ethanicuss.astraladditions.registry.*;
import net.fabricmc.api.ModInitializer;
Expand All @@ -18,17 +18,16 @@ public class AstralAdditions implements ModInitializer {
public void onInitialize() {

ModFluids.registerFluids();
ModEntities.init();
ModEntities.registerEntities();
ModBlocks.registerBlocks();
ModBlocks.registerBlockItems();
ModItems.registerItems();
ModSounds.registerSounds();
//DesizerRecipes.init();
ModRecipes.registerRecipes();
ModEntitySpawn.addEntitySpawn();

ModEntitySpawns.registerEntitySpawn();
ModEffects.registerEffects();
ModParticles.registerParticles();

ModPotion.registerPotions();
LOGGER.info("Astral Additions is active!");
}
}
Original file line number Diff line number Diff line change
@@ -1,52 +1,24 @@
package com.github.ethanicuss.astraladditions;

import com.github.ethanicuss.astraladditions.entities.ModEntities;
import com.github.ethanicuss.astraladditions.entities.blackhole.BlackholeEntityRenderer;
import com.github.ethanicuss.astraladditions.fluids.ModFluids;
import com.github.ethanicuss.astraladditions.particle.ModParticlesClient;
import com.github.ethanicuss.astraladditions.registry.*;
import com.github.ethanicuss.astraladditions.playertracker.PlayerTracker;
import com.github.ethanicuss.astraladditions.registry.ModBlocks;
import com.github.ethanicuss.astraladditions.registry.ModItemProperties;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
import net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandlerRegistry;
import net.fabricmc.fabric.api.client.render.fluid.v1.SimpleFluidRenderHandler;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.entity.model.EntityModelLayer;
import net.minecraft.util.Identifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class AstralAdditionsClient implements ClientModInitializer {

public static final Logger LOGGER = LoggerFactory.getLogger(AstralAdditions.MOD_ID);
public static PlayerTracker playerTracker = new PlayerTracker();
public static final EntityModelLayer MODEL_MOONMAN_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "moonman"), "main");
public static final EntityModelLayer MODEL_HEMOGIANT_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "hemogiant"), "main");
public static final EntityModelLayer MODEL_VOIDTOUCHED_SKELETON_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "voidtouched_skeleton"), "main");
public static final EntityModelLayer MODEL_VOIDTOUCHED_ZOMBIE_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "voidtouched_zombie"), "main");
public static final EntityModelLayer MODEL_SHIMMER_BLAZE_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "shimmer_blaze"), "main");
public static final EntityModelLayer MODEL_PHAST_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "phast"), "main");
public static final EntityModelLayer MODEL_WHAST_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "whast"), "main");
public static final EntityModelLayer MODEL_GLAZER_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "glazer"), "main");
public static final EntityModelLayer MODEL_ENDER_WATCHER_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "ender_watcher"), "main");
public static final EntityModelLayer MODEL_COGFLY_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "cogfly"), "main");


@Override
public void onInitializeClient() {
FluidRenderHandlerRegistry.INSTANCE.register(ModFluids.STILL_SHIMMER, ModFluids.FLOWING_SHIMMER, new SimpleFluidRenderHandler(
new Identifier("astraladditions:block/shimmer"),
new Identifier("astraladditions:block/shimmer"),
0xffd6fa
));
FluidRenderHandlerRegistry.INSTANCE.register(ModFluids.STILL_SPUTUM, ModFluids.FLOWING_SPUTUM, new SimpleFluidRenderHandler(
new Identifier("astraladditions:block/sputum/sputum"),
new Identifier("astraladditions:block/sputum/sputum"),
0xffffff
));
FluidRenderHandlerRegistry.INSTANCE.setBlockTransparency(ModFluids.SPUTUM, true);
BlockRenderLayerMap.INSTANCE.putFluids(RenderLayer.getTranslucent(), ModFluids.STILL_SPUTUM, ModFluids.FLOWING_SPUTUM, ModFluids.STILL_SHIMMER, ModFluids.FLOWING_SHIMMER);

ModEntities.initClient();
ModEntities.registerClient();
ModBlocks.registerClient();
ModParticlesClient.registerFactories();

ModItemProperties.register();
ModFluids.registerFluidRenderersClient();
ModParticles.registerClient();
ModItemProperties.registerClient();
ModPotion.registerClient();
LOGGER.info("Astral Additions client is active!");
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
package com.github.ethanicuss.astraladditions.blocks;

import com.github.ethanicuss.astraladditions.registry.ModBlocks;
import com.github.ethanicuss.astraladditions.registry.ModData;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.ShapeContext;
import net.minecraft.entity.Entity;
import net.minecraft.entity.ai.pathing.NavigationType;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.state.property.BooleanProperty;
import net.minecraft.state.property.Properties;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import net.minecraft.world.WorldAccess;
Expand Down Expand Up @@ -89,4 +84,4 @@ public void onEntityCollision(BlockState state, World world, BlockPos pos, Entit
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type) {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.FallingBlockEntity;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.tag.BlockTags;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

Expand All @@ -26,4 +23,4 @@ public void onSteppedOn(World world, BlockPos pos, BlockState state, Entity enti

super.onSteppedOn(world, pos, state, entity);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Material;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.FallingBlockEntity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.tag.BlockTags;
Expand All @@ -23,7 +19,6 @@ public CrackedIceBlock(Settings settings) {

public void onSteppedOn(World world, BlockPos pos, BlockState state, Entity entity) {
if (canFallThrough(world.getBlockState(pos.down())) && pos.getY() >= world.getBottomY() && !world.isClient()) {
FallingBlockEntity fallingBlockEntity = FallingBlockEntity.spawnFromBlock(world, pos, state);
ModUtils.spawnForcedParticles((ServerWorld)world, ParticleTypes.SNOWFLAKE, pos.getX(), pos.getY(), pos.getZ(), 20, 0.5, 0.5, 0.5, 0.3);
ModUtils.spawnForcedParticles((ServerWorld)world, ParticleTypes.CAMPFIRE_COSY_SMOKE, pos.getX(), pos.getY(), pos.getZ(), 3, 0.5, 0.5, 0.5, 0);
}
Expand All @@ -35,4 +30,4 @@ public static boolean canFallThrough(BlockState state) {
Material material = state.getMaterial();
return state.isAir() || state.isIn(BlockTags.FIRE) || material.isLiquid() || material.isReplaceable();
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,16 @@
import com.github.ethanicuss.astraladditions.registry.ModBlocks;
import com.github.ethanicuss.astraladditions.registry.ModData;
import net.minecraft.block.*;
import net.minecraft.entity.Entity;
import net.minecraft.entity.ai.pathing.NavigationType;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.BooleanProperty;
import net.minecraft.state.property.IntProperty;
import net.minecraft.state.property.Properties;
import net.minecraft.tag.FluidTags;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import net.minecraft.world.WorldAccess;
import net.minecraft.world.WorldView;

Expand Down Expand Up @@ -116,4 +112,4 @@ protected void appendProperties(StateManager.Builder<Block, BlockState> builder)
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type) {
return false;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.github.ethanicuss.astraladditions.blocks;

import com.github.ethanicuss.astraladditions.registry.ModBlocks;
import com.github.ethanicuss.astraladditions.registry.ModData;
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
Expand Down Expand Up @@ -42,4 +41,4 @@ public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type) {
return false;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
package com.github.ethanicuss.astraladditions.blocks;

import com.github.ethanicuss.astraladditions.entities.ModEntities;
import com.github.ethanicuss.astraladditions.registry.ModEntities;
import com.github.ethanicuss.astraladditions.entities.prismatic_geyser.PrismaticGeyserEntity;
import com.github.ethanicuss.astraladditions.entities.shimmerblaze.ShimmerBlazeRainEntity;
import com.github.ethanicuss.astraladditions.util.ModUtils;
import io.github.fabricators_of_create.porting_lib.data.SoundDefinition;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvent;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
Expand All @@ -26,7 +20,6 @@
import net.minecraft.world.World;

import java.util.List;
import java.util.Random;

public class GeyserBlock extends Block {

Expand Down Expand Up @@ -65,4 +58,4 @@ public void onSteppedOn(World world, BlockPos pos, BlockState state, Entity enti

super.onSteppedOn(world, pos, state, entity);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
import net.minecraft.block.*;
import net.minecraft.entity.Entity;
import net.minecraft.entity.ai.pathing.NavigationType;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.BooleanProperty;
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.shape.VoxelShape;
Expand Down Expand Up @@ -83,7 +78,6 @@ public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {

@Override
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
//entity.damage(DamageSource.CACTUS, 2.0f);
}

@Override
Expand All @@ -105,4 +99,4 @@ public AbstractBlock.OffsetType getOffsetType() {
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type) {
return false;
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
package com.github.ethanicuss.astraladditions.blocks;
package com.github.ethanicuss.astraladditions.blocks.desizer;

import com.github.ethanicuss.astraladditions.registry.ModBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.HorizontalFacingBlock;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ItemPlacementContext;
import net.minecraft.item.ItemStack;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.EnumProperty;
import net.minecraft.util.StringIdentifiable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.World;

public class DesizerCasingBlock extends HorizontalFacingBlock {

Expand All @@ -23,17 +18,6 @@ public DesizerCasingBlock(Settings settings) {
this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH).with(TYPE, Type.BASE));

}
//! This can be removed in a later update
@Override
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) {
super.onPlaced(world, pos, state, placer, itemStack);
if (!world.isClient) {
if (state.getBlock() != ModBlocks.DESIZER_BASE) {
BlockState newBlockState = ModBlocks.DESIZER_BASE.getDefaultState();
world.setBlockState(pos, newBlockState);
}
}
}

@Override
public BlockState getPlacementState(ItemPlacementContext ctx) {
Expand Down Expand Up @@ -65,4 +49,4 @@ public String asString() {
}
}

}
}
Loading
Loading