Skip to content

Commit 75c1bde

Browse files
authored
Merge pull request #19 from HyperRaccoon13/cleanup
Cleanup
2 parents ddd5e8a + 03693de commit 75c1bde

File tree

125 files changed

+733
-959
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+733
-959
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ dependencies {
6161
modLocalRuntime("me.shedaniel:RoughlyEnoughItems-fabric:${rei_version}")
6262

6363
modCompileOnly "maven.modrinth:yttr:${yttr_version}"
64-
modLocalRuntime "maven.modrinth:yttr:${yttr_version}"
64+
//modLocalRuntime "maven.modrinth:yttr:${yttr_version}"
6565

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.github.ethanicuss.astraladditions;
22

3-
import com.github.ethanicuss.astraladditions.entities.ModEntities;
4-
import com.github.ethanicuss.astraladditions.fluids.ModFluids;
5-
import com.github.ethanicuss.astraladditions.particle.ModParticles;
3+
import com.github.ethanicuss.astraladditions.registry.ModEntities;
4+
import com.github.ethanicuss.astraladditions.registry.ModFluids;
5+
import com.github.ethanicuss.astraladditions.registry.ModParticles;
66
import com.github.ethanicuss.astraladditions.playertracker.WorldRegister;
77
import com.github.ethanicuss.astraladditions.registry.*;
88
import net.fabricmc.api.ModInitializer;
@@ -18,17 +18,16 @@ public class AstralAdditions implements ModInitializer {
1818
public void onInitialize() {
1919

2020
ModFluids.registerFluids();
21-
ModEntities.init();
21+
ModEntities.registerEntities();
2222
ModBlocks.registerBlocks();
23+
ModBlocks.registerBlockItems();
2324
ModItems.registerItems();
2425
ModSounds.registerSounds();
25-
//DesizerRecipes.init();
2626
ModRecipes.registerRecipes();
27-
ModEntitySpawn.addEntitySpawn();
28-
27+
ModEntitySpawns.registerEntitySpawn();
2928
ModEffects.registerEffects();
3029
ModParticles.registerParticles();
31-
30+
ModPotion.registerPotions();
3231
LOGGER.info("Astral Additions is active!");
3332
}
3433
}
Lines changed: 12 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,24 @@
11
package com.github.ethanicuss.astraladditions;
22

3-
import com.github.ethanicuss.astraladditions.entities.ModEntities;
4-
import com.github.ethanicuss.astraladditions.entities.blackhole.BlackholeEntityRenderer;
5-
import com.github.ethanicuss.astraladditions.fluids.ModFluids;
6-
import com.github.ethanicuss.astraladditions.particle.ModParticlesClient;
3+
import com.github.ethanicuss.astraladditions.registry.*;
74
import com.github.ethanicuss.astraladditions.playertracker.PlayerTracker;
8-
import com.github.ethanicuss.astraladditions.registry.ModBlocks;
9-
import com.github.ethanicuss.astraladditions.registry.ModItemProperties;
105
import net.fabricmc.api.ClientModInitializer;
11-
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
12-
import net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandlerRegistry;
13-
import net.fabricmc.fabric.api.client.render.fluid.v1.SimpleFluidRenderHandler;
14-
import net.minecraft.client.render.RenderLayer;
15-
import net.minecraft.client.render.entity.model.EntityModelLayer;
16-
import net.minecraft.util.Identifier;
6+
import org.slf4j.Logger;
7+
import org.slf4j.LoggerFactory;
178

189
public class AstralAdditionsClient implements ClientModInitializer {
19-
10+
public static final Logger LOGGER = LoggerFactory.getLogger(AstralAdditions.MOD_ID);
2011
public static PlayerTracker playerTracker = new PlayerTracker();
21-
public static final EntityModelLayer MODEL_MOONMAN_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "moonman"), "main");
22-
public static final EntityModelLayer MODEL_HEMOGIANT_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "hemogiant"), "main");
23-
public static final EntityModelLayer MODEL_VOIDTOUCHED_SKELETON_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "voidtouched_skeleton"), "main");
24-
public static final EntityModelLayer MODEL_VOIDTOUCHED_ZOMBIE_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "voidtouched_zombie"), "main");
25-
public static final EntityModelLayer MODEL_SHIMMER_BLAZE_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "shimmer_blaze"), "main");
26-
public static final EntityModelLayer MODEL_PHAST_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "phast"), "main");
27-
public static final EntityModelLayer MODEL_WHAST_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "whast"), "main");
28-
public static final EntityModelLayer MODEL_GLAZER_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "glazer"), "main");
29-
public static final EntityModelLayer MODEL_ENDER_WATCHER_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "ender_watcher"), "main");
30-
public static final EntityModelLayer MODEL_COGFLY_LAYER = new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "cogfly"), "main");
12+
13+
3114
@Override
3215
public void onInitializeClient() {
33-
FluidRenderHandlerRegistry.INSTANCE.register(ModFluids.STILL_SHIMMER, ModFluids.FLOWING_SHIMMER, new SimpleFluidRenderHandler(
34-
new Identifier("astraladditions:block/shimmer"),
35-
new Identifier("astraladditions:block/shimmer"),
36-
0xffd6fa
37-
));
38-
FluidRenderHandlerRegistry.INSTANCE.register(ModFluids.STILL_SPUTUM, ModFluids.FLOWING_SPUTUM, new SimpleFluidRenderHandler(
39-
new Identifier("astraladditions:block/sputum/sputum"),
40-
new Identifier("astraladditions:block/sputum/sputum"),
41-
0xffffff
42-
));
43-
FluidRenderHandlerRegistry.INSTANCE.setBlockTransparency(ModFluids.SPUTUM, true);
44-
BlockRenderLayerMap.INSTANCE.putFluids(RenderLayer.getTranslucent(), ModFluids.STILL_SPUTUM, ModFluids.FLOWING_SPUTUM, ModFluids.STILL_SHIMMER, ModFluids.FLOWING_SHIMMER);
45-
46-
ModEntities.initClient();
16+
ModEntities.registerClient();
4717
ModBlocks.registerClient();
48-
ModParticlesClient.registerFactories();
49-
50-
ModItemProperties.register();
18+
ModFluids.registerFluidRenderersClient();
19+
ModParticles.registerClient();
20+
ModItemProperties.registerClient();
21+
ModPotion.registerClient();
22+
LOGGER.info("Astral Additions client is active!");
5123
}
5224
}

src/main/java/com/github/ethanicuss/astraladditions/blocks/BrambleboneBlock.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
package com.github.ethanicuss.astraladditions.blocks;
22

33
import com.github.ethanicuss.astraladditions.registry.ModBlocks;
4-
import com.github.ethanicuss.astraladditions.registry.ModData;
54
import net.minecraft.block.Block;
65
import net.minecraft.block.BlockState;
7-
import net.minecraft.block.ShapeContext;
86
import net.minecraft.entity.Entity;
97
import net.minecraft.entity.ai.pathing.NavigationType;
108
import net.minecraft.entity.damage.DamageSource;
119
import net.minecraft.server.world.ServerWorld;
12-
import net.minecraft.state.property.BooleanProperty;
13-
import net.minecraft.state.property.Properties;
1410
import net.minecraft.util.math.BlockPos;
1511
import net.minecraft.util.math.Direction;
1612
import net.minecraft.util.math.Vec3d;
17-
import net.minecraft.util.shape.VoxelShape;
1813
import net.minecraft.world.BlockView;
1914
import net.minecraft.world.World;
2015
import net.minecraft.world.WorldAccess;
@@ -89,4 +84,4 @@ public void onEntityCollision(BlockState state, World world, BlockPos pos, Entit
8984
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type) {
9085
return false;
9186
}
92-
}
87+
}

src/main/java/com/github/ethanicuss/astraladditions/blocks/BubbleBlock.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@
44
import net.minecraft.block.Block;
55
import net.minecraft.block.BlockState;
66
import net.minecraft.block.Blocks;
7-
import net.minecraft.block.Material;
87
import net.minecraft.entity.Entity;
9-
import net.minecraft.entity.FallingBlockEntity;
108
import net.minecraft.particle.ParticleTypes;
119
import net.minecraft.server.world.ServerWorld;
12-
import net.minecraft.tag.BlockTags;
1310
import net.minecraft.util.math.BlockPos;
1411
import net.minecraft.world.World;
1512

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

2724
super.onSteppedOn(world, pos, state, entity);
2825
}
29-
}
26+
}

src/main/java/com/github/ethanicuss/astraladditions/blocks/CrackedIceBlock.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44
import net.minecraft.block.Block;
55
import net.minecraft.block.BlockState;
66
import net.minecraft.block.Material;
7-
import net.minecraft.enchantment.EnchantmentHelper;
87
import net.minecraft.entity.Entity;
9-
import net.minecraft.entity.FallingBlockEntity;
10-
import net.minecraft.entity.LivingEntity;
11-
import net.minecraft.entity.damage.DamageSource;
128
import net.minecraft.particle.ParticleTypes;
139
import net.minecraft.server.world.ServerWorld;
1410
import net.minecraft.tag.BlockTags;
@@ -23,7 +19,6 @@ public CrackedIceBlock(Settings settings) {
2319

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

src/main/java/com/github/ethanicuss/astraladditions/blocks/DesizerControllerBlockEntity.java

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/main/java/com/github/ethanicuss/astraladditions/blocks/DroptusBlock.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,16 @@
33
import com.github.ethanicuss.astraladditions.registry.ModBlocks;
44
import com.github.ethanicuss.astraladditions.registry.ModData;
55
import net.minecraft.block.*;
6-
import net.minecraft.entity.Entity;
76
import net.minecraft.entity.ai.pathing.NavigationType;
8-
import net.minecraft.entity.damage.DamageSource;
97
import net.minecraft.server.world.ServerWorld;
108
import net.minecraft.state.StateManager;
119
import net.minecraft.state.property.BooleanProperty;
1210
import net.minecraft.state.property.IntProperty;
1311
import net.minecraft.state.property.Properties;
14-
import net.minecraft.tag.FluidTags;
1512
import net.minecraft.util.math.BlockPos;
1613
import net.minecraft.util.math.Direction;
1714
import net.minecraft.util.shape.VoxelShape;
1815
import net.minecraft.world.BlockView;
19-
import net.minecraft.world.World;
2016
import net.minecraft.world.WorldAccess;
2117
import net.minecraft.world.WorldView;
2218

@@ -116,4 +112,4 @@ protected void appendProperties(StateManager.Builder<Block, BlockState> builder)
116112
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type) {
117113
return false;
118114
}
119-
}
115+
}

src/main/java/com/github/ethanicuss/astraladditions/blocks/EnderTipBlock.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.github.ethanicuss.astraladditions.blocks;
22

33
import com.github.ethanicuss.astraladditions.registry.ModBlocks;
4-
import com.github.ethanicuss.astraladditions.registry.ModData;
54
import net.minecraft.block.AbstractBlock;
65
import net.minecraft.block.Block;
76
import net.minecraft.block.BlockState;
@@ -42,4 +41,4 @@ public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos
4241
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type) {
4342
return false;
4443
}
45-
}
44+
}

src/main/java/com/github/ethanicuss/astraladditions/blocks/GeyserBlock.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
package com.github.ethanicuss.astraladditions.blocks;
22

3-
import com.github.ethanicuss.astraladditions.entities.ModEntities;
3+
import com.github.ethanicuss.astraladditions.registry.ModEntities;
44
import com.github.ethanicuss.astraladditions.entities.prismatic_geyser.PrismaticGeyserEntity;
5-
import com.github.ethanicuss.astraladditions.entities.shimmerblaze.ShimmerBlazeRainEntity;
65
import com.github.ethanicuss.astraladditions.util.ModUtils;
7-
import io.github.fabricators_of_create.porting_lib.data.SoundDefinition;
86
import net.minecraft.block.Block;
97
import net.minecraft.block.BlockState;
10-
import net.minecraft.enchantment.EnchantmentHelper;
118
import net.minecraft.entity.Entity;
12-
import net.minecraft.entity.LivingEntity;
13-
import net.minecraft.entity.damage.DamageSource;
149
import net.minecraft.entity.player.PlayerEntity;
1510
import net.minecraft.particle.ParticleTypes;
1611
import net.minecraft.server.world.ServerWorld;
1712
import net.minecraft.sound.SoundCategory;
18-
import net.minecraft.sound.SoundEvent;
1913
import net.minecraft.sound.SoundEvents;
2014
import net.minecraft.util.ActionResult;
2115
import net.minecraft.util.Hand;
@@ -26,7 +20,6 @@
2620
import net.minecraft.world.World;
2721

2822
import java.util.List;
29-
import java.util.Random;
3023

3124
public class GeyserBlock extends Block {
3225

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

6659
super.onSteppedOn(world, pos, state, entity);
6760
}
68-
}
61+
}

0 commit comments

Comments
 (0)