Fix Block Materials
All checks were successful
EnergonRelics/pipeline/head This commit looks good

This commit is contained in:
TheBrokenRail 2020-07-22 16:17:01 -04:00
parent ca53495c08
commit fe1d959ad5
11 changed files with 29 additions and 14 deletions

View File

@ -27,7 +27,7 @@ public class DefensiveLaserBlock extends EnergyProviderBlock {
public static final BooleanProperty POWERED = Properties.POWERED; public static final BooleanProperty POWERED = Properties.POWERED;
public DefensiveLaserBlock() { public DefensiveLaserBlock() {
super(FabricBlockSettings.of(Material.GLASS, MaterialColor.BLACK).sounds(BlockSoundGroup.GLASS).requiresTool().strength(50.0F, 1200.0F).nonOpaque().allowsSpawning((state, world, pos, type) -> false).solidBlock((state, world, pos) -> false).suffocates((state, world, pos) -> false).lightLevel(state -> state.get(POWERED) ? 7 : 0)); super(FabricBlockSettings.of(Material.STONE, MaterialColor.BLACK).sounds(BlockSoundGroup.GLASS).requiresTool().strength(50.0F, 1200.0F).nonOpaque().allowsSpawning((state, world, pos, type) -> false).solidBlock((state, world, pos) -> false).suffocates((state, world, pos) -> false).lightLevel(state -> state.get(POWERED) ? 7 : 0));
setDefaultState(getDefaultState().with(POWERED, false)); setDefaultState(getDefaultState().with(POWERED, false));
} }

View File

@ -19,7 +19,7 @@ public class EnergonLightBlock extends EnergyProviderBlock {
public static final BooleanProperty POWERED = Properties.POWERED; public static final BooleanProperty POWERED = Properties.POWERED;
public EnergonLightBlock() { public EnergonLightBlock() {
super(FabricBlockSettings.of(Material.GLASS).sounds(BlockSoundGroup.GLASS).nonOpaque().lightLevel(state -> state.get(POWERED) ? 15 : 0).strength(0.3f)); super(FabricBlockSettings.of(Material.REDSTONE_LAMP).sounds(BlockSoundGroup.GLASS).nonOpaque().lightLevel(state -> state.get(POWERED) ? 15 : 0).strength(0.3f));
setDefaultState(getDefaultState().with(POWERED, false)); setDefaultState(getDefaultState().with(POWERED, false));
} }

View File

@ -4,6 +4,7 @@ import com.thebrokenrail.energonrelics.block.entity.SolarPanelBlockEntity;
import com.thebrokenrail.energonrelics.block.util.energy.EnergyProviderBlock; import com.thebrokenrail.energonrelics.block.util.energy.EnergyProviderBlock;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.Material; import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.BlockEntityType; import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.sound.BlockSoundGroup; import net.minecraft.sound.BlockSoundGroup;
@ -12,7 +13,7 @@ import java.util.function.Function;
public class SolarPanelBlock extends EnergyProviderBlock { public class SolarPanelBlock extends EnergyProviderBlock {
public SolarPanelBlock() { public SolarPanelBlock() {
super(FabricBlockSettings.of(Material.GLASS).sounds(BlockSoundGroup.GLASS).requiresTool().strength(1.5f, 6.0f)); super(FabricBlockSettings.of(Material.STONE, MaterialColor.BLUE_TERRACOTTA).sounds(BlockSoundGroup.GLASS).requiresTool().strength(1.5f, 6.0f));
} }
@Override @Override

View File

@ -3,9 +3,10 @@ package com.thebrokenrail.energonrelics.block;
import com.thebrokenrail.energonrelics.block.util.SimpleBlock; import com.thebrokenrail.energonrelics.block.util.SimpleBlock;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.Material; import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
public class ThermalCasingBlock extends SimpleBlock { public class ThermalCasingBlock extends SimpleBlock {
public ThermalCasingBlock() { public ThermalCasingBlock() {
super(FabricBlockSettings.of(Material.STONE).requiresTool().strength(1.5f, 6.0f)); super(FabricBlockSettings.of(Material.STONE, MaterialColor.YELLOW_TERRACOTTA).requiresTool().strength(1.5f, 6.0f));
} }
} }

View File

@ -6,12 +6,14 @@ import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.Material; import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.BlockView; import net.minecraft.world.BlockView;
public class ThermalGlassBlock extends SimpleBlock { public class ThermalGlassBlock extends SimpleBlock {
public ThermalGlassBlock() { public ThermalGlassBlock() {
super(FabricBlockSettings.of(Material.STONE).requiresTool().strength(1.5f, 6.0f).nonOpaque().allowsSpawning((state, world, pos, type) -> false).solidBlock((state, world, pos) -> false).suffocates((state, world, pos) -> false)); super(FabricBlockSettings.of(Material.STONE, MaterialColor.YELLOW_TERRACOTTA).sounds(BlockSoundGroup.GLASS).requiresTool().strength(1.5f, 6.0f).nonOpaque().allowsSpawning((state, world, pos, type) -> false).solidBlock((state, world, pos) -> false).suffocates((state, world, pos) -> false));
} }
@Override @Override

View File

@ -1,14 +1,18 @@
package com.thebrokenrail.energonrelics.block.battery; package com.thebrokenrail.energonrelics.block.battery;
import com.thebrokenrail.energonrelics.block.entity.battery.ActiveBatteryControllerBlockEntity; import com.thebrokenrail.energonrelics.block.entity.battery.ActiveBatteryControllerBlockEntity;
import com.thebrokenrail.energonrelics.block.util.energy.FacingEnergyProviderBlock;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.BlockEntityType; import net.minecraft.block.entity.BlockEntityType;
import java.util.function.Function; import java.util.function.Function;
public class ActiveBatteryControllerBlock extends PassiveBatteryControllerBlock { public class ActiveBatteryControllerBlock extends FacingEnergyProviderBlock {
public ActiveBatteryControllerBlock() { public ActiveBatteryControllerBlock() {
super(); super(FabricBlockSettings.of(Material.STONE, MaterialColor.ORANGE_TERRACOTTA).requiresTool().strength(1.5f, 6.0f));
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import com.thebrokenrail.energonrelics.block.entity.battery.BatteryCoreBlockEnti
import com.thebrokenrail.energonrelics.block.util.SimpleBlockWithEntity; import com.thebrokenrail.energonrelics.block.util.SimpleBlockWithEntity;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.Material; import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.BlockEntityType; import net.minecraft.block.entity.BlockEntityType;
@ -11,7 +12,7 @@ import java.util.function.Function;
public class BatteryCoreBlock extends SimpleBlockWithEntity { public class BatteryCoreBlock extends SimpleBlockWithEntity {
public BatteryCoreBlock() { public BatteryCoreBlock() {
super(FabricBlockSettings.of(Material.STONE).requiresTool().strength(1.5f, 6.0f)); super(FabricBlockSettings.of(Material.STONE, MaterialColor.RED_TERRACOTTA).requiresTool().strength(1.5f, 6.0f));
} }
@Override @Override

View File

@ -4,6 +4,7 @@ import com.thebrokenrail.energonrelics.block.entity.battery.PassiveBatteryContro
import com.thebrokenrail.energonrelics.block.util.energy.FacingEnergyProviderBlock; import com.thebrokenrail.energonrelics.block.util.energy.FacingEnergyProviderBlock;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.Material; import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.BlockEntityType; import net.minecraft.block.entity.BlockEntityType;
@ -11,7 +12,7 @@ import java.util.function.Function;
public class PassiveBatteryControllerBlock extends FacingEnergyProviderBlock { public class PassiveBatteryControllerBlock extends FacingEnergyProviderBlock {
public PassiveBatteryControllerBlock() { public PassiveBatteryControllerBlock() {
super(FabricBlockSettings.of(Material.STONE).requiresTool().strength(1.5f, 6.0f)); super(FabricBlockSettings.of(Material.STONE, MaterialColor.RED_TERRACOTTA).requiresTool().strength(1.5f, 6.0f));
} }
@Override @Override

View File

@ -1,9 +1,12 @@
package com.thebrokenrail.energonrelics.block.reactor; package com.thebrokenrail.energonrelics.block.reactor;
import com.thebrokenrail.energonrelics.block.battery.PassiveBatteryControllerBlock;
import com.thebrokenrail.energonrelics.block.entity.reactor.ReactorControllerBlockEntity; import com.thebrokenrail.energonrelics.block.entity.reactor.ReactorControllerBlockEntity;
import com.thebrokenrail.energonrelics.block.util.energy.FacingEnergyProviderBlock;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.BlockEntityType; import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemPlacementContext;
@ -19,11 +22,11 @@ import java.util.Random;
import java.util.function.Function; import java.util.function.Function;
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public class ReactorControllerBlock extends PassiveBatteryControllerBlock { public class ReactorControllerBlock extends FacingEnergyProviderBlock {
public static final BooleanProperty POWERED = Properties.POWERED; public static final BooleanProperty POWERED = Properties.POWERED;
public ReactorControllerBlock() { public ReactorControllerBlock() {
super(); super(FabricBlockSettings.of(Material.STONE, MaterialColor.PURPLE_TERRACOTTA).requiresTool().strength(1.5f, 6.0f));
setDefaultState(getDefaultState().with(POWERED, false)); setDefaultState(getDefaultState().with(POWERED, false));
} }

View File

@ -4,6 +4,7 @@ import com.thebrokenrail.energonrelics.block.entity.reactor.ReactorCoreBlockEnti
import com.thebrokenrail.energonrelics.block.util.SimpleBlockWithEntity; import com.thebrokenrail.energonrelics.block.util.SimpleBlockWithEntity;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.Material; import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.BlockEntityType; import net.minecraft.block.entity.BlockEntityType;
@ -11,7 +12,7 @@ import java.util.function.Function;
public class ReactorCoreBlock extends SimpleBlockWithEntity { public class ReactorCoreBlock extends SimpleBlockWithEntity {
public ReactorCoreBlock() { public ReactorCoreBlock() {
super(FabricBlockSettings.of(Material.STONE).requiresTool().strength(1.5f, 6.0f)); super(FabricBlockSettings.of(Material.STONE, MaterialColor.PURPLE_TERRACOTTA).requiresTool().strength(1.5f, 6.0f));
} }
@Override @Override

View File

@ -6,6 +6,7 @@ import com.thebrokenrail.energonrelics.block.util.SimpleBlockWithEntity;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.Material; import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.BlockEntityType; import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
@ -23,7 +24,7 @@ import java.util.function.Function;
public class ReactorInputBlock extends SimpleBlockWithEntity { public class ReactorInputBlock extends SimpleBlockWithEntity {
public ReactorInputBlock() { public ReactorInputBlock() {
super(FabricBlockSettings.of(Material.STONE).requiresTool().strength(1.5f, 6.0f)); super(FabricBlockSettings.of(Material.STONE, MaterialColor.YELLOW_TERRACOTTA).requiresTool().strength(1.5f, 6.0f));
} }
@Override @Override