Tweaking
All checks were successful
EnergonRelics/pipeline/head This commit looks good

This commit is contained in:
TheBrokenRail 2020-07-22 18:57:51 -04:00
parent 5e0d956b37
commit 142fd83a29
8 changed files with 30 additions and 18 deletions

View File

@ -2,6 +2,7 @@ package com.thebrokenrail.energonrelics;
import com.thebrokenrail.energonrelics.block.BlockBreakerBlock; import com.thebrokenrail.energonrelics.block.BlockBreakerBlock;
import com.thebrokenrail.energonrelics.block.DefensiveLaserBlock; import com.thebrokenrail.energonrelics.block.DefensiveLaserBlock;
import com.thebrokenrail.energonrelics.block.VeridiumBlockBlock;
import com.thebrokenrail.energonrelics.block.structure.StructureGeneratorBlock; import com.thebrokenrail.energonrelics.block.structure.StructureGeneratorBlock;
import com.thebrokenrail.energonrelics.block.ThermalGlassBlock; import com.thebrokenrail.energonrelics.block.ThermalGlassBlock;
import com.thebrokenrail.energonrelics.block.battery.ActiveBatteryControllerBlock; import com.thebrokenrail.energonrelics.block.battery.ActiveBatteryControllerBlock;
@ -22,11 +23,9 @@ import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder; import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
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.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.registry.BuiltinRegistries; import net.minecraft.util.registry.BuiltinRegistries;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;
@ -58,8 +57,8 @@ public class EnergonRelics implements ModInitializer {
public static final ReactorControllerBlock REACTOR_CONTROLLER_BLOCK = new ReactorControllerBlock(); public static final ReactorControllerBlock REACTOR_CONTROLLER_BLOCK = new ReactorControllerBlock();
public static final Item VERIDIUM_INGOT_ITEM = new Item(new Item.Settings().group(ITEM_GROUP)); public static final Item VERIDIUM_INGOT_ITEM = new Item(new Item.Settings().group(ITEM_GROUP));
public static final SimpleBlock VERIDIUM_ORE_BLOCK = new SimpleBlock(FabricBlockSettings.of(Material.STONE).requiresTool().strength(3.0F, 3.0F)); public static final SimpleBlock VERIDIUM_ORE_BLOCK = new SimpleBlock(FabricBlockSettings.of(Material.STONE).requiresTool().strength(3f, 3f));
public static final SimpleBlock VERIDIUM_BLOCK_BLOCK = new SimpleBlock(FabricBlockSettings.of(Material.METAL, MaterialColor.GOLD).requiresTool().strength(3.0F, 6.0F).sounds(BlockSoundGroup.METAL)); public static final SimpleBlock VERIDIUM_BLOCK_BLOCK = new VeridiumBlockBlock();
public static final ConfiguredFeature<?, ?> VERIDIUM_ORE_FEATURE = Feature.ORE.configure(new OreFeatureConfig(OreFeatureConfig.class_5436.field_25845, EnergonRelics.VERIDIUM_ORE_BLOCK.getDefaultState(), 9)).method_30377(32).spreadHorizontally().repeat(2); public static final ConfiguredFeature<?, ?> VERIDIUM_ORE_FEATURE = Feature.ORE.configure(new OreFeatureConfig(OreFeatureConfig.class_5436.field_25845, EnergonRelics.VERIDIUM_ORE_BLOCK.getDefaultState(), 9)).method_30377(32).spreadHorizontally().repeat(2);
public static final Item CIRCUIT_BOARD_ITEM = new Item(new Item.Settings().group(ITEM_GROUP)); public static final Item CIRCUIT_BOARD_ITEM = new Item(new Item.Settings().group(ITEM_GROUP));

View File

@ -21,7 +21,7 @@ public class BlockBreakerBlock extends FacingEnergyProviderBlock {
public static final BooleanProperty POWERED = Properties.POWERED; public static final BooleanProperty POWERED = Properties.POWERED;
public BlockBreakerBlock() { public BlockBreakerBlock() {
super(FabricBlockSettings.copy(Blocks.BLACKSTONE).strength(2.0F, 6.0F).nonOpaque().lightLevel(state -> state.get(POWERED) ? 7 : 0)); super(FabricBlockSettings.copy(Blocks.BLACKSTONE).strength(2f, 6f).nonOpaque().lightLevel(state -> state.get(POWERED) ? 7 : 0));
setDefaultState(getDefaultState().with(POWERED, false)); setDefaultState(getDefaultState().with(POWERED, false));
} }

View File

@ -39,7 +39,7 @@ public class DefensiveLaserBlock extends EnergyProviderBlock {
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
@Environment(EnvType.CLIENT) @Environment(EnvType.CLIENT)
public float getAmbientOcclusionLightLevel(BlockState state, BlockView world, BlockPos pos) { public float getAmbientOcclusionLightLevel(BlockState state, BlockView world, BlockPos pos) {
return 1.0F; return 1f;
} }
@Override @Override

View File

@ -20,7 +20,7 @@ public class ThermalGlassBlock extends SimpleBlock {
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
@Environment(EnvType.CLIENT) @Environment(EnvType.CLIENT)
public float getAmbientOcclusionLightLevel(BlockState state, BlockView world, BlockPos pos) { public float getAmbientOcclusionLightLevel(BlockState state, BlockView world, BlockPos pos) {
return 1.0F; return 1f;
} }
@Override @Override

View File

@ -0,0 +1,13 @@
package com.thebrokenrail.energonrelics.block;
import com.thebrokenrail.energonrelics.block.util.SimpleBlock;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.sound.BlockSoundGroup;
public class VeridiumBlockBlock extends SimpleBlock {
public VeridiumBlockBlock() {
super(FabricBlockSettings.of(Material.METAL, MaterialColor.PURPLE).requiresTool().strength(3f, 6f).sounds(BlockSoundGroup.METAL).nonOpaque().lightLevel(8).emissiveLighting((state, world, pos) -> true));
}
}

View File

@ -147,7 +147,7 @@ public class DefensiveLaserBlockEntity extends EnergyReceiverBlockEntity {
Vec3d pos = getPosVec(); Vec3d pos = getPosVec();
double diffX = targetPos.getX() - pos.getX(); double diffX = targetPos.getX() - pos.getX();
double diffZ = targetPos.getZ() - pos.getZ(); double diffZ = targetPos.getZ() - pos.getZ();
return -((float) (MathHelper.atan2(diffZ, diffX) * RAD2DEG) - 90.0F); return -((float) (MathHelper.atan2(diffZ, diffX) * RAD2DEG) - 90f);
} }
private static final int COUNTDOWN = 28; private static final int COUNTDOWN = 28;

View File

@ -53,12 +53,12 @@ public class HighlightBlockEntityRenderer extends BlockEntityRenderer<BlockEntit
} }
private void renderLayer(BlockEntity entity, Matrix4f matrix4f, VertexConsumer vertexConsumer, float r, float b) { private void renderLayer(BlockEntity entity, Matrix4f matrix4f, VertexConsumer vertexConsumer, float r, float b) {
renderSide(entity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, r, b, Direction.SOUTH); renderSide(entity, matrix4f, vertexConsumer, 0f, 1f, 0f, 1f, 1f, 1f, 1f, 1f, r, b, Direction.SOUTH);
renderSide(entity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, r, b, Direction.NORTH); renderSide(entity, matrix4f, vertexConsumer, 0f, 1f, 1f, 0f, 0f, 0f, 0f, 0f, r, b, Direction.NORTH);
renderSide(entity, matrix4f, vertexConsumer, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, r, b, Direction.EAST); renderSide(entity, matrix4f, vertexConsumer, 1f, 1f, 1f, 0f, 0f, 1f, 1f, 0f, r, b, Direction.EAST);
renderSide(entity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, r, b, Direction.WEST); renderSide(entity, matrix4f, vertexConsumer, 0f, 0f, 0f, 1f, 0f, 1f, 1f, 0f, r, b, Direction.WEST);
renderSide(entity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, r, b, Direction.DOWN); renderSide(entity, matrix4f, vertexConsumer, 0f, 1f, 0f, 0f, 0f, 0f, 1f, 1f, r, b, Direction.DOWN);
renderSide(entity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0f, 1.0f, 1.0F, 1.0F, 0.0F, 0.0F, r, b, Direction.UP); renderSide(entity, matrix4f, vertexConsumer, 0f, 1f, 1.0f, 1.0f, 1f, 1f, 0f, 0f, r, b, Direction.UP);
} }
private boolean shouldDrawSide(BlockEntity entity, Direction side) { private boolean shouldDrawSide(BlockEntity entity, Direction side) {

View File

@ -30,8 +30,8 @@
"block.energonrelics.block_breaker": "Block Breaker", "block.energonrelics.block_breaker": "Block Breaker",
"item.energonrelics.veridium_powder": "Veridium Powder", "item.energonrelics.veridium_powder": "Veridium Powder",
"effect.energonrelics.veridium_poisoning": "Veridium Poisoning", "effect.energonrelics.veridium_poisoning": "Veridium Poisoning",
"item.minecraft.potion.effect.energonrelics.veridium_poisoning": "Potion of Veridium Poisoning", "item.minecraft.potion.effect.energonrelics.veridium_poisoning": "Potion of Degradation",
"item.minecraft.splash_potion.effect.energonrelics.veridium_poisoning": "Splash Potion of Veridium Poisoning", "item.minecraft.splash_potion.effect.energonrelics.veridium_poisoning": "Splash Potion of Degradation",
"item.minecraft.lingering_potion.effect.energonrelics.veridium_poisoning": "Lingering Potion of Veridium Poisoning", "item.minecraft.lingering_potion.effect.energonrelics.veridium_poisoning": "Lingering Potion of Degradation",
"item.minecraft.tipped_arrow.effect.energonrelics.veridium_poisoning": "Arrow of Veridium Poisoning" "item.minecraft.tipped_arrow.effect.energonrelics.veridium_poisoning": "Arrow of Degradation"
} }