Skip to content

Commit

Permalink
autoformatter
Browse files Browse the repository at this point in the history
  • Loading branch information
Lothrazar committed Oct 4, 2024
1 parent 4e814b3 commit c35ddb5
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 25 deletions.
1 change: 0 additions & 1 deletion src/main/java/com/lothrazar/cyclic/CyclicLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ public void info(String string) {
logger.info(string);
}
}

}
1 change: 1 addition & 0 deletions src/main/java/com/lothrazar/cyclic/ModCyclic.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class ModCyclic {
public static final String MODID = "cyclic";
public static final CyclicLogger LOGGER = new CyclicLogger(LogManager.getLogger());

@SuppressWarnings("deprecation")
public ModCyclic() {
FMLJavaModLoadingContext.get().getModEventBus().addListener(EventRegistry::setup);
FMLJavaModLoadingContext.get().getModEventBus().addListener(ClientRegistryCyclic::setupClient);
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/com/lothrazar/cyclic/block/BlockCyclic.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.lothrazar.cyclic.block;

import com.lothrazar.cyclic.block.facade.IBlockFacade;
import com.lothrazar.cyclic.config.ClientConfigCyclic;
import com.lothrazar.cyclic.registry.BlockRegistry;
import com.lothrazar.library.block.EntityBlockFlib;
Expand All @@ -25,8 +24,6 @@
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.ForgeCapabilities;
import net.minecraftforge.fluids.FluidUtil;
Expand All @@ -43,15 +40,6 @@ public class BlockCyclic extends EntityBlockFlib {
public BlockCyclic(Properties properties) {
super(properties);
BlockRegistry.BLOCKSCLIENTREGISTRY.add(this);

}

@Override
public VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext ctx) {
if (this instanceof IBlockFacade) {
//ok lets check
}
return super.getShape(state, level, pos, ctx);
}

public static boolean never(BlockState bs, BlockGetter bg, BlockPos pos) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ public CableTileBase(BlockEntityType<?> tileEntityTypeIn, BlockPos pos, BlockSta
}

@Override
public void setField(int field, int value) {
}
public void setField(int field, int value) {}

@Override
public int getField(int field) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos,
return ShapeCache.getOrCreate(state, CableBase::createShape);
}


@Override
public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
return new TileCableEnergy(pos, state);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public void registerClient() {
@Override
public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
if (ConfigRegistry.CABLE_FACADES.get()) {
var facade = this.getFacadeShape(state, worldIn, pos, context);
if (facade != null) {
return facade;
var facade = this.getFacadeShape(state, worldIn, pos, context);
if (facade != null) {
return facade;
}
}
}
return ShapeCache.getOrCreate(state, CableBase::createShape);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@

public class BlockLightFacade extends BlockCyclic implements IBlockFacade {

private static final VoxelShape TWO = Block.box(7, 7, 7,
9, 9, 9);
private static final VoxelShape THREE = Block.box(6, 6, 6,
10, 10, 10);

public BlockLightFacade(Properties properties) {
super(properties.lightLevel(state -> 15).strength(1F).noOcclusion());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public int getField(int field) {
return 0;
}


private CompoundTag facadeState = null;

@Override
public CompoundTag getFacade() {
return facadeState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public SoundmufflerBlockFacade(Properties properties) {

@Override
public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) {

var facade = this.getFacadeShape(state, worldIn, pos, context);
if (facade != null) {
return facade;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/lothrazar/cyclic/event/ItemEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ public void onHit(PlayerInteractEvent.LeftClickBlock event) {
}
}

//
private void onHitFacadeHandler(PlayerInteractEvent.LeftClickBlock event, Player player, ItemStack held, BlockState target) {
if (held.isEmpty() && event.getLevel().isClientSide()) {
PacketRegistry.INSTANCE.sendToServer(new BlockFacadeMessage(event.getPos(), true));
Expand Down

0 comments on commit c35ddb5

Please sign in to comment.