Fixed some warnings
This commit is contained in:
parent
a0d827fa3b
commit
774d42d944
6 changed files with 6 additions and 18 deletions
|
@ -87,10 +87,7 @@ public class LightningRodBlockEntity extends PowerAcceptorBlockEntity implements
|
|||
|
||||
LightningEntity lightningBolt = EntityType.LIGHTNING_BOLT.create(world);
|
||||
lightningBolt.refreshPositionAfterTeleport(Vec3d.ofBottomCenter(world.getTopPosition(Heightmap.Type.MOTION_BLOCKING, getPos())));
|
||||
|
||||
if (!world.isClient) {
|
||||
world.spawnEntity(lightningBolt);
|
||||
}
|
||||
world.spawnEntity(lightningBolt);
|
||||
addEnergy((long) (TechRebornConfig.lightningRodBaseEnergyStrike * (0.3F + weatherStrength)));
|
||||
machineBaseBlock.setActive(true, world, pos);
|
||||
onStatusHoldTicks = 400;
|
||||
|
|
|
@ -130,7 +130,7 @@ public class SolarPanelBlockEntity extends PowerAcceptorBlockEntity implements I
|
|||
// At this point, we know a light source is present and it's clear weather. We need to determine
|
||||
// the level of generation based on % of time through the day, with peak production at noon and
|
||||
// a smooth transition to night production as sun rises/sets
|
||||
float multiplier = 0.0f;
|
||||
float multiplier;
|
||||
if (skyAngle > 0.75) {
|
||||
// Morning to noon
|
||||
multiplier = (0.25f - (1 - skyAngle)) / 0.25f;
|
||||
|
|
|
@ -50,7 +50,6 @@ public abstract class AbstractIronMachineBlockEntity extends MachineBaseBlockEnt
|
|||
public int totalCookingTime;
|
||||
int fuelSlot;
|
||||
Block toolDrop;
|
||||
boolean active = false;
|
||||
|
||||
public AbstractIronMachineBlockEntity(BlockEntityType<?> blockEntityTypeIn, BlockPos pos, BlockState state, int fuelSlot, Block toolDrop) {
|
||||
super(blockEntityTypeIn, pos, state);
|
||||
|
@ -63,7 +62,6 @@ public abstract class AbstractIronMachineBlockEntity extends MachineBaseBlockEnt
|
|||
/**
|
||||
* Checks that we have all inputs and can put output into slot
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected abstract boolean canSmelt();
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ public class IronFurnaceBlockEntity extends AbstractIronMachineBlockEntity imple
|
|||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
private float getExperienceFor(ItemStack stack) {
|
||||
private float getExperienceFor() {
|
||||
Optional<SmeltingRecipe> recipe = world.getRecipeManager().getFirstMatch(RecipeType.SMELTING, this, world);
|
||||
return recipe.map(AbstractCookingRecipe::getExperience).orElse(0F);
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class IronFurnaceBlockEntity extends AbstractIronMachineBlockEntity imple
|
|||
} else if (inventory.getStack(outputSlot).isItemEqualIgnoreDamage(resultStack)) {
|
||||
inventory.getStack(outputSlot).increment(resultStack.getCount());
|
||||
}
|
||||
experience += getExperienceFor(inputStack);
|
||||
experience += getExperienceFor();
|
||||
if (inputStack.getCount() > 1) {
|
||||
inventory.shrinkSlot(inputSlot, 1);
|
||||
} else {
|
||||
|
|
|
@ -27,7 +27,6 @@ package techreborn.blockentity.machine.misc;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.FluidDrainable;
|
||||
import net.minecraft.block.entity.BlockEntityType;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.fluid.Fluid;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -52,10 +51,6 @@ public class DrainBlockEntity extends MachineBaseBlockEntity implements IToolDro
|
|||
super(TRBlockEntities.DRAIN, pos, state);
|
||||
}
|
||||
|
||||
public DrainBlockEntity(BlockEntityType<?> blockEntityTypeIn, BlockPos pos, BlockState state) {
|
||||
super(blockEntityTypeIn, pos, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick(World world, BlockPos pos, BlockState state, MachineBaseBlockEntity blockEntity) {
|
||||
super.tick(world, pos, state, blockEntity);
|
||||
|
|
|
@ -478,9 +478,7 @@ public class TRContent {
|
|||
}
|
||||
|
||||
private List<Block> allBlocks() {
|
||||
return Collections.unmodifiableList(Arrays.asList(
|
||||
block, stairsBlock, slabBlock, wallBlock
|
||||
));
|
||||
return List.of(block, stairsBlock, slabBlock, wallBlock);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -511,7 +509,7 @@ public class TRContent {
|
|||
|
||||
public static ItemConvertible[] getCasings() {
|
||||
return Arrays.stream(MachineBlocks.values())
|
||||
.map((Function<MachineBlocks, ItemConvertible>) machineBlocks -> machineBlocks.casing::asItem)
|
||||
.map((Function<MachineBlocks, ItemConvertible>) machineBlocks -> machineBlocks.casing)
|
||||
.toArray(ItemConvertible[]::new);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue