initial 20w11a
This commit is contained in:
parent
dffec285b2
commit
adad632549
25 changed files with 65 additions and 71 deletions
|
@ -77,7 +77,7 @@ public class DynamicCellItem extends Item implements ItemFluidInfo {
|
|||
|
||||
// Thanks vanilla :)
|
||||
private void playEmptyingSound(@Nullable PlayerEntity playerEntity, IWorld world, BlockPos blockPos, Fluid fluid) {
|
||||
SoundEvent soundEvent = fluid.matches(FluidTags.LAVA) ? SoundEvents.ITEM_BUCKET_EMPTY_LAVA : SoundEvents.ITEM_BUCKET_EMPTY;
|
||||
SoundEvent soundEvent = fluid.isIn(FluidTags.LAVA) ? SoundEvents.ITEM_BUCKET_EMPTY_LAVA : SoundEvents.ITEM_BUCKET_EMPTY;
|
||||
world.playSound(playerEntity, blockPos, soundEvent, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ public class DynamicCellItem extends Item implements ItemFluidInfo {
|
|||
if (!blockState.isAir() && !canPlace && (!(blockState.getBlock() instanceof FluidFillable) || !((FluidFillable)blockState.getBlock()).canFillWithFluid(world, pos, blockState, fluid))) {
|
||||
return hitResult != null && this.placeFluid(player, world, hitResult.getBlockPos().offset(hitResult.getSide()), null, filledCell);
|
||||
} else {
|
||||
if (world.dimension.doesWaterVaporize() && fluid.matches(FluidTags.WATER)) {
|
||||
if (world.dimension.doesWaterVaporize() && fluid.isIn(FluidTags.WATER)) {
|
||||
int i = pos.getX();
|
||||
int j = pos.getY();
|
||||
int k = pos.getZ();
|
||||
|
|
|
@ -51,7 +51,7 @@ public class ScrapBoxItem extends Item {
|
|||
List<RebornRecipe> scrapboxRecipeList = ModRecipes.SCRAPBOX.getRecipes(world);
|
||||
int random = world.random.nextInt(scrapboxRecipeList.size());
|
||||
ItemStack out = scrapboxRecipeList.get(random).getOutputs().get(0);
|
||||
WorldUtils.dropItem(out, world, player.getBlockPos());
|
||||
WorldUtils.dropItem(out, world, player.getSenseCenterPos());
|
||||
stack.decrement(1);
|
||||
}
|
||||
return new TypedActionResult<>(ActionResult.SUCCESS, stack);
|
||||
|
|
|
@ -96,7 +96,7 @@ public class QuantumSuitItem extends TRArmourItem implements ItemStackModifiers,
|
|||
if (playerEntity.abilities.flying) {
|
||||
Energy.of(stack).use(flyCost);
|
||||
}
|
||||
playerEntity.onGround = true;
|
||||
playerEntity.method_24830(true);
|
||||
} else {
|
||||
playerEntity.abilities.allowFlying = false;
|
||||
playerEntity.abilities.flying = false;
|
||||
|
|
|
@ -73,12 +73,12 @@ public class ChainsawItem extends AxeItem implements EnergyHolder, ItemDurabilit
|
|||
|
||||
// AxeItem
|
||||
@Override
|
||||
public float getMiningSpeed(ItemStack stack, BlockState state) {
|
||||
public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) {
|
||||
if (Energy.of(stack).getEnergy() >= cost
|
||||
&& (state.getMaterial() == Material.WOOD)) {
|
||||
return this.poweredSpeed;
|
||||
}
|
||||
return super.getMiningSpeed(stack, state);
|
||||
return super.getMiningSpeedMultiplier(stack, state);
|
||||
}
|
||||
|
||||
// MiningToolItem
|
||||
|
|
|
@ -65,15 +65,15 @@ public class DrillItem extends PickaxeItem implements EnergyHolder, ItemDurabili
|
|||
|
||||
// PickaxeItem
|
||||
@Override
|
||||
public float getMiningSpeed(ItemStack stack, BlockState state) {
|
||||
public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) {
|
||||
if (Energy.of(stack).getEnergy() < cost) {
|
||||
return super.getMiningSpeed(stack, state);
|
||||
return super.getMiningSpeedMultiplier(stack, state);
|
||||
}
|
||||
if (Items.WOODEN_PICKAXE.getMiningSpeed(stack, state) > 1.0F
|
||||
|| Items.WOODEN_SHOVEL.getMiningSpeed(stack, state) > 1.0F) {
|
||||
if (Items.WOODEN_PICKAXE.getMiningSpeedMultiplier(stack, state) > 1.0F
|
||||
|| Items.WOODEN_SHOVEL.getMiningSpeedMultiplier(stack, state) > 1.0F) {
|
||||
return poweredSpeed;
|
||||
}
|
||||
return super.getMiningSpeed(stack, state);
|
||||
return super.getMiningSpeedMultiplier(stack, state);
|
||||
}
|
||||
|
||||
// MiningToolItem
|
||||
|
|
|
@ -60,7 +60,7 @@ public class JackhammerItem extends PickaxeItem implements EnergyHolder, ItemDur
|
|||
|
||||
// PickaxeItem
|
||||
@Override
|
||||
public float getMiningSpeed(ItemStack stack, BlockState state) {
|
||||
public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) {
|
||||
if (state.getMaterial() == Material.STONE && Energy.of(stack).getEnergy() >= cost) {
|
||||
return miningSpeed;
|
||||
}
|
||||
|
|
|
@ -65,11 +65,11 @@ public class RockCutterItem extends PickaxeItem implements EnergyHolder, ItemDur
|
|||
}
|
||||
|
||||
@Override
|
||||
public float getMiningSpeed(ItemStack stack, BlockState state) {
|
||||
public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) {
|
||||
if (Energy.of(stack).getEnergy() < cost) {
|
||||
return 2F;
|
||||
} else {
|
||||
return Items.DIAMOND_PICKAXE.getMiningSpeed(stack, state);
|
||||
return Items.DIAMOND_PICKAXE.getMiningSpeedMultiplier(stack, state);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ public class IndustrialJackhammerItem extends JackhammerItem {
|
|||
|
||||
// PickaxeItem
|
||||
@Override
|
||||
public float getMiningSpeed(ItemStack stack, BlockState state) {
|
||||
public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) {
|
||||
if (state.getMaterial() == Material.STONE && Energy.of(stack).getEnergy() >= cost) {
|
||||
// x4 diamond mining speed
|
||||
return 32.0F;
|
||||
|
|
|
@ -75,11 +75,11 @@ public class OmniToolItem extends PickaxeItem implements EnergyHolder, ItemDurab
|
|||
}
|
||||
|
||||
@Override
|
||||
public float getMiningSpeed(ItemStack stack, BlockState state) {
|
||||
public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) {
|
||||
if (Energy.of(stack).getEnergy() >= cost) {
|
||||
return ToolMaterials.DIAMOND.getMiningSpeed();
|
||||
return ToolMaterials.DIAMOND.getMiningSpeedMultiplier();
|
||||
}
|
||||
return super.getMiningSpeed(stack, state);
|
||||
return super.getMiningSpeedMultiplier(stack, state);
|
||||
}
|
||||
|
||||
// MiningToolItem
|
||||
|
|
|
@ -40,7 +40,7 @@ public class TRHoeItem extends HoeItem {
|
|||
}
|
||||
|
||||
public TRHoeItem(ToolMaterial material, String repairOreDict) {
|
||||
super(material, 0F, new Item.Settings().group(TechReborn.ITEMGROUP));
|
||||
super(material, 0, 0F, new Item.Settings().group(TechReborn.ITEMGROUP));
|
||||
this.repairOreDict = repairOreDict;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue