Skip to content

Commit

Permalink
Changed electrical plug id to "socket", modified biome generation val…
Browse files Browse the repository at this point in the history
…ues, removed completely bacteria (rest in peace) and added jumbled documents
  • Loading branch information
northernlimit committed Sep 27, 2024
1 parent f1b61f2 commit c6c5486
Show file tree
Hide file tree
Showing 58 changed files with 173 additions and 1,037 deletions.
3 changes: 0 additions & 3 deletions src/main/java/net/limit/cubliminal/Cubliminal.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
import net.fabricmc.fabric.api.entity.event.v1.ServerPlayerEvents;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry;
import net.limit.cubliminal.config.CubliminalConfig;
import net.limit.cubliminal.entity.custom.BacteriaEntity;
import net.limit.cubliminal.event.ServerTickHandler;
import net.limit.cubliminal.event.command.NoClipCommand;
import net.limit.cubliminal.event.command.SanityCommand;
Expand Down Expand Up @@ -43,7 +41,6 @@ public void onInitialize() {
CubliminalSounds.init();
CubliminalEntities.init();
CubliminalEffects.init();
FabricDefaultAttributeRegistry.register(CubliminalEntities.BACTERIA, BacteriaEntity.createBacteriaAttributes());
CubliminalBlockEntities.init();
CubliminalPackets.registerC2SPackets();
ServerTickEvents.START_SERVER_TICK.register(new ServerTickHandler());
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/net/limit/cubliminal/CubliminalClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
import net.fabricmc.fabric.api.client.rendering.v1.EntityModelLayerRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback;
import net.limit.cubliminal.client.hud.NoClippingHudOverlay;
import net.limit.cubliminal.client.hud.SanityBarHudOverlay;
import net.limit.cubliminal.entity.client.BacteriaModel;
import net.limit.cubliminal.entity.client.BacteriaRenderer;
import net.limit.cubliminal.entity.client.SeatRenderer;
import net.limit.cubliminal.event.KeyInputHandler;
import net.limit.cubliminal.init.*;
Expand All @@ -26,10 +23,6 @@ public void onInitializeClient() {
KeyInputHandler.register();
CubliminalModelRenderers.init();

EntityRendererRegistry
.register(CubliminalEntities.BACTERIA, BacteriaRenderer::new);
EntityModelLayerRegistry
.registerModelLayer(CubliminalModelLayers.BACTERIA, BacteriaModel::getTexturedModelData);
EntityRendererRegistry
.register(CubliminalEntities.SEAT_ENTITY, SeatRenderer::new);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ public class FluorescentLightBlock extends Block {
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
return VOXEL_SHAPE;
}
/*
@Override
public BlockRenderType getRenderType(BlockState state) {
return BlockRenderType.MODEL;
}
*/

public FluorescentLightBlock(Settings settings) {
super(settings);
Expand Down Expand Up @@ -101,26 +94,10 @@ public BlockState getPlacementState(ItemPlacementContext ctx) {

return blockState.with(RED, needsToBeRed);
}
/*
@Nullable
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type) {
//return checkType(type, CubliminalBlockEntities.FLUORESCENT_LIGHT_BLOCK_ENTITY, FluorescentLightBlockEntity::tick);
return null;
}
*/

@Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(LIT, FACING, RED);
}
/*
@Nullable
@Override
public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
//return new FluorescentLightBlockEntity(pos, state);
return null;
}

*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ public class FusedFluorescentLightBlock extends Block {
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
return VOXEL_SHAPE;
}
/*
@Override
public BlockRenderType getRenderType(BlockState state) {
return BlockRenderType.MODEL;
}
*/

public FusedFluorescentLightBlock(Settings settings) {
super(settings);
Expand Down Expand Up @@ -100,26 +93,10 @@ public BlockState rotate(BlockState state, BlockRotation rotation) {
public BlockState mirror(BlockState state, BlockMirror mirror) {
return state.rotate(mirror.getRotation(state.get(FACING)));
}
/*
@Nullable
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type) {
//return checkType(type, CubliminalBlockEntities.FUSED_FLUORESCENT_LIGHT_BLOCK_ENTITY, FusedFluorescentLightBlockEntity::tick);
return null;
}
*/

@Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(LIT, FACING, RED);
}
/*
@Nullable
@Override
public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
//return new FusedFluorescentLightBlockEntity(pos, state);
return null;
}

*/
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package net.limit.cubliminal.block.custom;

import com.mojang.serialization.MapCodec;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.HorizontalFacingBlock;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.DirectionProperty;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.world.WorldView;

public class JumbledDocumentsBlock extends HorizontalFacingBlock {
public static final MapCodec<JumbledDocumentsBlock> CODEC = JumbledDocumentsBlock.createCodec(JumbledDocumentsBlock::new);
public static final DirectionProperty FACING = HorizontalFacingBlock.FACING;
protected static final VoxelShape SHAPE = Block.createCuboidShape(0.0, 0.0, 0.0, 16.0, 2.0, 16.0);
protected JumbledDocumentsBlock(Settings settings) {
super(settings);
this.setDefaultState(this.getDefaultState().with(FACING, Direction.NORTH));
}

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

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

@Override
protected MapCodec<? extends HorizontalFacingBlock> getCodec() {
return CODEC;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
import net.minecraft.world.WorldView;
import org.jetbrains.annotations.Nullable;

public class ElectricalPlugBlock extends HorizontalFacingBlock {
public static final MapCodec<ElectricalPlugBlock> CODEC = ElectricalPlugBlock.createCodec(ElectricalPlugBlock::new);
public class SocketBlock extends HorizontalFacingBlock {
public static final MapCodec<SocketBlock> CODEC = SocketBlock.createCodec(SocketBlock::new);
public static final DirectionProperty FACING = HorizontalFacingBlock.FACING;
protected static final VoxelShape WEST_SHAPE = Block.createCuboidShape(15.5, 4, 4.5, 16, 12.5, 11.5);
protected static final VoxelShape EAST_SHAPE = Block.createCuboidShape(0, 4, 4.5, 0.5, 12.5, 11.5);
protected static final VoxelShape SOUTH_SHAPE = Block.createCuboidShape(4.5, 4, 0, 11.5, 12.5, 0.5);
protected static final VoxelShape NORTH_SHAPE = Block.createCuboidShape(4.5, 4, 15.5, 11.5, 12.5, 16);
public ElectricalPlugBlock(Settings settings) {
public SocketBlock(Settings settings) {
super(settings);
this.setDefaultState(this.getDefaultState().with(FACING, Direction.NORTH));
}
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit c6c5486

Please sign in to comment.